Skip to content

Commit d2d77b5

Browse files
committed
use null file instead of IO.pipe. not sure why this matters for success
1 parent fb38943 commit d2d77b5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/arduino_ci/arduino_cmd.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def run_and_capture(*args, **kwargs)
8888
pipe_out, pipe_out_wr = IO.pipe
8989
pipe_err, pipe_err_wr = IO.pipe
9090
our_kwargs = { out: pipe_out_wr, err: pipe_err_wr }
91-
eventual_kwargs = kwargs.merge(our_kwargs)
91+
eventual_kwargs = our_kwargs.merge(kwargs)
9292
success = run(*args, **eventual_kwargs)
9393
pipe_out_wr.close
9494
pipe_err_wr.close
@@ -117,7 +117,8 @@ def board_installed?(boardname)
117117
# @param name [String] the board name
118118
# @return [bool] whether the command succeeded
119119
def install_board(boardname)
120-
run_and_capture("--install-boards", boardname)[:success]
120+
# TODO: find out why IO.pipe fails but File::NULL succeeds :(
121+
run_and_capture("--install-boards", boardname, out: File::NULL)[:success]
121122
end
122123

123124
# install a library by name

0 commit comments

Comments
 (0)