Skip to content

Commit

Permalink
Fix a couple of bad JULIA_DEPOT_PATH settings (#4110)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Dec 9, 2024
1 parent d84a1a3 commit f9ad1c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/new.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2998,7 +2998,7 @@ end
@testset "relative depot path" begin
isolate(loaded_depot=false) do
mktempdir() do tmp
withenv("JULIA_DEPOT_PATH" => tmp) do
withenv("JULIA_DEPOT_PATH" => tmp * (Sys.iswindows() ? ";" : ":")) do
Base.init_depot_path()
cp(joinpath(@__DIR__, "test_packages", "BasicSandbox"), joinpath(tmp, "BasicSandbox"))
git_init_and_commit(joinpath(tmp, "BasicSandbox"))
Expand Down
4 changes: 3 additions & 1 deletion test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,9 @@ end
tmp_55850 = mktempdir()
tmp_sym_link = joinpath(tmp_55850, "sym")
symlink(tmp_55850, tmp_sym_link; dir_target=true)
withenv("JULIA_DEPOT_PATH" => tmp_sym_link * (Sys.iswindows() ? ";" : ":"), "JULIA_LOAD_PATH" => nothing) do
depot_path = join([tmp_sym_link, Base.DEPOT_PATH...], Sys.iswindows() ? ";" : ":")
# include the symlink in the depot path and include the regular default depot so we don't precompile this Pkg again
withenv("JULIA_DEPOT_PATH" => depot_path, "JULIA_LOAD_PATH" => nothing) do
prompt = readchomp(`$(Base.julia_cmd()[1]) --project=$(dirname(@__DIR__)) --startup-file=no -e "using Pkg, REPL; Pkg.activate(io=devnull); REPLExt = Base.get_extension(Pkg, :REPLExt); print(REPLExt.promptf())"`)
@test prompt == "(@v$(VERSION.major).$(VERSION.minor)) pkg> "
end
Expand Down

0 comments on commit f9ad1c0

Please sign in to comment.