File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 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)
7979 end
8080 for depot in Base. DEPOT_PATH
8181 envdir = joinpath (depot, " environments" )
82- if startswith (abspath (project_file), abspath (envdir))
82+ if startswith (safe_realpath (project_file), safe_realpath (envdir))
8383 return " @" * name
8484 end
8585 end
Original file line number Diff line number Diff line change @@ -1781,11 +1781,20 @@ end
17811781
17821782@testset " Dummy Pkg prompt" begin
17831783 # 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
17851785 prompt = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no -e "using REPL; print(REPL.Pkg_promptf())"` )
17861786 @test prompt == " (@v$(VERSION . major) .$(VERSION . minor) ) pkg> "
17871787 end
17881788
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+
17891798 get_prompt (proj:: String ) = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no $(proj) -e "using REPL; print(REPL.Pkg_promptf())"` )
17901799
17911800 @test get_prompt (" --project=$(pkgdir (REPL)) " ) == " (REPL) pkg> "
You can’t perform that action at this time.
0 commit comments