Skip to content

Commit

Permalink
Set JULIA_PROJECT when running the subprocess in ensurecompiled()
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge committed Nov 23, 2024
1 parent ea484c2 commit 1f98bca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,9 @@ function ensurecompiled(project, packages, sysimage)
# TODO: Only precompile `packages` (should be available in Pkg 1.8)
cmd = `$(get_julia_cmd()) --sysimage=$sysimage -e 'using Pkg; Pkg.precompile()'`
splitter = Sys.iswindows() ? ';' : ':'
@debug "ensurecompiled: running $cmd" JULIA_LOAD_PATH = "$project$(splitter)@stdlib"
cmd = addenv(cmd, "JULIA_LOAD_PATH" => "$project$(splitter)@stdlib")
JULIA_LOAD_PATH = "$project$(splitter)@stdlib"
@debug "ensurecompiled: running $cmd" JULIA_LOAD_PATH
cmd = addenv(cmd, "JULIA_LOAD_PATH" => JULIA_LOAD_PATH, "JULIA_PROJECT" => project)
run(cmd)
return
end
Expand Down

0 comments on commit 1f98bca

Please sign in to comment.