Don't use 'IO.popen' when no block is given, use 'system' instead.

This commit is contained in:
2022-11-05 22:36:21 -05:00
parent aa65433b14
commit 04d40fe8fc

View File

@@ -81,15 +81,17 @@ class W3DHub
status.zero?
else
IO.popen(command) do |io|
if block
IO.popen(command, "r") do |io|
io.each_line do |line|
block&.call(line)
end
end
end
$CHILD_STATUS.success?
else
system(command)
end
end
end