Skip to content

Commit 87fb012

Browse files
committed
add run wrapper that does not capture, but with the same signture as run_with_capture
1 parent 6124d6a commit 87fb012

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/arduino_ci/arduino_cmd.rb

+8-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def run_with_gui_guess(message, *args, **kwargs)
8383
end
8484

8585
# run a command and capture its output
86-
# @return [Hash] {:out => StringIO, :err => StringIO, :success => bool}
86+
# @return [Hash] {:out => String, :err => String, :success => bool}
8787
def run_and_capture(*args, **kwargs)
8888
pipe_out, pipe_out_wr = IO.pipe
8989
pipe_err, pipe_err_wr = IO.pipe
@@ -99,6 +99,13 @@ def run_and_capture(*args, **kwargs)
9999
{ out: str_out, err: str_err, success: success }
100100
end
101101

102+
# run a command and don't capture its output, but use the same signature
103+
# @return [Hash] {:out => String, :err => String, :success => bool}
104+
def run_wrap(*args, **kwargs)
105+
success = run(*args, **kwargs)
106+
{ out: "NOPE, use run_and_capture", err: "NOPE, use run_and_capture", success: success }
107+
end
108+
102109
# check whether a board is installed
103110
# we do this by just selecting a board.
104111
# the arduino binary will error if unrecognized and do a successful no-op if it's installed

0 commit comments

Comments
 (0)