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? status.zero?
else else
IO.popen(command) do |io| if block
if block IO.popen(command, "r") do |io|
io.each_line do |line| io.each_line do |line|
block&.call(line) block&.call(line)
end end
end end
end
$CHILD_STATUS.success? $CHILD_STATUS.success?
else
system(command)
end
end end
end end