Skip to content

Commit 3a17f5c

Browse files
authored
reset load path to fix usage as an app (#59)
1 parent b5de9b0 commit 3a17f5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiling.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ function compile_products(recipe::ImageRecipe)
7878
end
7979

8080
project_arg = recipe.project == "" ? Base.active_project() : recipe.project
81-
inst_cmd = `$(Base.julia_cmd(cpu_target=precompile_cpu_target)) --project=$project_arg -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"`
81+
env_overrides = Dict{String,Any}("JULIA_LOAD_PATH"=>nothing)
82+
inst_cmd = addenv(`$(Base.julia_cmd(cpu_target=precompile_cpu_target)) --project=$project_arg -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"`, env_overrides...)
8283
recipe.verbose && println("Running: $inst_cmd")
8384
precompile_time = time_ns()
8485
if !success(pipeline(inst_cmd; stdout, stderr))
@@ -109,6 +110,7 @@ function compile_products(recipe::ImageRecipe)
109110
end
110111

111112
# Threading
113+
cmd = addenv(cmd, env_overrides...)
112114
recipe.verbose && println("Running: $cmd")
113115
# Show a spinner while the compiler runs
114116
spinner_done, spinner_task = _start_spinner("Compiling...")

0 commit comments

Comments
 (0)