Skip to content

Commit 8599b12

Browse files
committed
Extend run_custom_script to accept arguments
1 parent e44da15 commit 8599b12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exe/arduino_ci.rb

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

343343
assure_multiline("Running #{script_pathname} with #{script_shell} in libraries working dir") do
344344
Dir.chdir(@backend.lib_dir) do
345-
IO.popen([script_shell, script_pathname.to_s], err: [:child, :out]) do |io|
345+
IO.popen([script_shell, script_pathname.to_s, *args], err: [:child, :out]) do |io|
346346
io.each_line { |line| puts " #{line}" }
347347
end
348348
end

0 commit comments

Comments
 (0)