File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ function projname(project_file::String)
79
79
end
80
80
for depot in Base. DEPOT_PATH
81
81
envdir = joinpath (depot, " environments" )
82
- if startswith (abspath (project_file), abspath (envdir))
82
+ if startswith (safe_realpath (project_file), safe_realpath (envdir))
83
83
return " @" * name
84
84
end
85
85
end
Original file line number Diff line number Diff line change @@ -1781,11 +1781,20 @@ end
1781
1781
1782
1782
@testset " Dummy Pkg prompt" begin
1783
1783
# do this in an empty depot to test default for new users
1784
- withenv (" JULIA_DEPOT_PATH" => mktempdir (), " JULIA_LOAD_PATH" => nothing ) do
1784
+ withenv (" JULIA_DEPOT_PATH" => mktempdir () * (Sys . iswindows () ? " ; " : " : " ) , " JULIA_LOAD_PATH" => nothing ) do
1785
1785
prompt = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no -e "using REPL; print(REPL.Pkg_promptf())"` )
1786
1786
@test prompt == " (@v$(VERSION . major) .$(VERSION . minor) ) pkg> "
1787
1787
end
1788
1788
1789
+ # Issue 55850
1790
+ tmp_55850 = mktempdir ()
1791
+ tmp_sym_link = joinpath (tmp_55850, " sym" )
1792
+ symlink (tmp_55850, tmp_sym_link; dir_target= true )
1793
+ withenv (" JULIA_DEPOT_PATH" => tmp_sym_link * (Sys. iswindows () ? " ;" : " :" ), " JULIA_LOAD_PATH" => nothing ) do
1794
+ prompt = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no -e "using REPL; print(REPL.projname(REPL.find_project_file()))"` )
1795
+ @test prompt == " @v$(VERSION . major) .$(VERSION . minor) "
1796
+ end
1797
+
1789
1798
get_prompt (proj:: String ) = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no $(proj) -e "using REPL; print(REPL.Pkg_promptf())"` )
1790
1799
1791
1800
@test get_prompt (" --project=$(pkgdir (REPL)) " ) == " (REPL) pkg> "
You can’t perform that action at this time.
0 commit comments