Skip to content

Commit a4ea56b

Browse files
committed
use capture3 instead of popen3
1 parent 85d40ba commit a4ea56b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/arduino_ci/host.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ def self.symlink(old_path, new_path)
4848
# windows mklink syntax is reverse of unix ln -s
4949
# windows mklink is built into cmd.exe
5050
# vulnerable to command injection, but okay because this is a hack to make a cli tool work.
51-
_stdin, stdout, stderr, wait_thr = Open3.popen3('cmd.exe', "/c mklink /D #{new_path} #{old_path}")
52-
wait_exit = wait_thr.value
51+
stdout, stderr, exitstatus = Open3.capture3('cmd.exe', "/c mklink /D #{new_path} #{old_path}")
5352
STDERR.puts stdout
5453
STDERR.puts stderr
55-
wait_exit.exitstatus
54+
exitstatus
5655
end
5756
end
5857
end

0 commit comments

Comments
 (0)