Skip to content

Commit 39a5901

Browse files
committed
Extend run_custom_script to accept arguments
1 parent 89512cb commit 39a5901

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
@@ -322,7 +322,7 @@ def get_annotated_compilers(config, cpp_library)
322322
# This feature is to drive GitHub actions / docker image installation where the container is
323323
# in a clean-slate state but needs some way to have custom library versions injected into it.
324324
# In this case, the user provided script would fetch a git repo or some other method.
325-
def run_custom_script(env_var)
325+
def run_custom_script(env_var, *args)
326326
script_path = ENV[env_var]
327327
script_shell = ENV[env_var + "_SHELL"] || "/bin/sh"
328328
inform("Environment variable #{env_var}") { "'#{script_path}'" }
@@ -334,7 +334,7 @@ def run_custom_script(env_var)
334334

335335
assure_multiline("Running #{script_pathname} with #{script_shell} in libraries working dir") do
336336
Dir.chdir(@backend.lib_dir) do
337-
IO.popen([script_shell, script_pathname.to_s], err: [:child, :out]) do |io|
337+
IO.popen([script_shell, script_pathname.to_s, *args], err: [:child, :out]) do |io|
338338
io.each_line { |line| puts " #{line}" }
339339
end
340340
end

0 commit comments

Comments
 (0)