Skip to content

Commit

Permalink
fix ARGS usage
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed May 9, 2024
1 parent 7590323 commit 926bf65
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,17 @@ function collect_artifacts(pkg_root::String; platform::AbstractPlatform=HostPlat
# If there is a dynamic artifact selector, run that to select artifacts
if isfile(selector_path)
res = mktemp() do path, io
redirect_stdout(io) do
old_args = copy(ARGS)
empty!(ARGS)
push!(ARGS, triplet(platform))
try
m = Module()
@eval m include(x) = Base.include(@__MODULE__, x)
Base.include(m, selector_path)
redirect_stdout(io) do
Base.include(m, selector_path)
end
finally
copy!(ARGS, old_args)
end
close(io)
meta_toml = read(path, String)
Expand Down

0 comments on commit 926bf65

Please sign in to comment.