Skip to content

Commit 4cd52f1

Browse files
committed
Extend run_custom_script to accept arguments
1 parent 3cfc8bc commit 4cd52f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: exe/arduino_ci.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def get_annotated_compilers(config, cpp_library)
336336
# This feature is to drive GitHub actions / docker image installation where the container is
337337
# in a clean-slate state but needs some way to have custom library versions injected into it.
338338
# In this case, the user provided script would fetch a git repo or some other method.
339-
def run_custom_script(env_var)
339+
def run_custom_script(env_var, *args)
340340
script_path = ENV[env_var]
341341
script_shell = ENV[env_var + "_SHELL"] || "/bin/sh"
342342
inform("Environment variable #{env_var}") { "'#{script_path}'" }
@@ -348,7 +348,7 @@ def run_custom_script(env_var)
348348

349349
assure_multiline("Running #{script_pathname} with #{script_shell} in libraries working dir") do
350350
Dir.chdir(@backend.lib_dir) do
351-
IO.popen([script_shell, script_pathname.to_s], err: [:child, :out]) do |io|
351+
IO.popen([script_shell, script_pathname.to_s, *args], err: [:child, :out]) do |io|
352352
io.each_line { |line| puts " #{line}" }
353353
end
354354
end

0 commit comments

Comments
 (0)