Skip to content

Commit 78fca73

Browse files
committed
expose kwargs explicitly in run call
1 parent 135f374 commit 78fca73

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/arduino_ci/arduino_cmd.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ def run_with_gui_guess(message, *args, **kwargs)
8484

8585
# run a command and capture its output
8686
# @return [Hash] {:out => StringIO, :err => StringIO, :success => bool}
87-
def run_and_capture(*args)
87+
def run_and_capture(*args, **kwargs)
8888
pipe_out, pipe_out_wr = IO.pipe
8989
pipe_err, pipe_err_wr = IO.pipe
90-
success = run(*args, out: pipe_out_wr, err: pipe_err_wr)
90+
our_kwargs = { out: pipe_out_wr, err: pipe_err_wr }
91+
eventual_kwargs = kwargs.merge(our_kwargs)
92+
success = run(*args, **eventual_kwargs)
9193
pipe_out_wr.close
9294
pipe_err_wr.close
9395
str_out = pipe_out.read

0 commit comments

Comments
 (0)