diff --git a/src/PackageCompiler.jl b/src/PackageCompiler.jl index 1467fe1d..855ec534 100644 --- a/src/PackageCompiler.jl +++ b/src/PackageCompiler.jl @@ -299,9 +299,8 @@ 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() ? ';' : ':' - JULIA_LOAD_PATH = "$project$(splitter)@stdlib" - @debug "ensurecompiled: running $cmd" JULIA_LOAD_PATH - cmd = setenv(cmd, "JULIA_LOAD_PATH" => JULIA_LOAD_PATH, "JULIA_PROJECT" => project) + @debug "ensurecompiled: running $cmd" JULIA_LOAD_PATH = "$project$(splitter)@stdlib" + cmd = addenv(cmd, "JULIA_LOAD_PATH" => "$project$(splitter)@stdlib") run(cmd) return end