Skip to content

Commit 0de49fb

Browse files
Kenostaticfloat
authored andcommitted
Skip executors that fail with ArgumentError
Instead of passing the error up to the toplevel, in case some other executor works.
1 parent 736faf5 commit 0de49fb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Sandbox.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,18 @@ function probe_executor(executor::SandboxExecutor; verbose::Bool = false)
180180

181181
# Command should execute successfully
182182
user_cmd = ignorestatus(user_cmd)
183-
if !success(run(executor, config, user_cmd))
183+
proc = try
184+
run(executor, config, user_cmd)
185+
catch e
186+
if isa(e, ArgumentError)
187+
if verbose
188+
@warn("Unable to build executor command: ", e.msg)
189+
end
190+
return false
191+
end
192+
rethrow(e)
193+
end
194+
if !success(proc)
184195
if verbose
185196
cmd_stdout = String(take!(cmd_stdout))
186197
cmd_stderr = String(take!(cmd_stderr))

0 commit comments

Comments
 (0)