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 @@ -88,7 +88,7 @@ function projname(project_file::String)
88
88
end
89
89
for depot in Base. DEPOT_PATH
90
90
envdir = joinpath (depot, " environments" )
91
- if startswith (abspath (project_file), abspath (envdir))
91
+ if startswith (safe_realpath (project_file), safe_realpath (envdir))
92
92
return " @" * name
93
93
end
94
94
end
Original file line number Diff line number Diff line change @@ -1966,11 +1966,20 @@ end
1966
1966
1967
1967
@testset " Dummy Pkg prompt" begin
1968
1968
# do this in an empty depot to test default for new users
1969
- withenv (" JULIA_DEPOT_PATH" => mktempdir (), " JULIA_LOAD_PATH" => nothing ) do
1969
+ withenv (" JULIA_DEPOT_PATH" => mktempdir () * (Sys . iswindows () ? " ; " : " : " ) , " JULIA_LOAD_PATH" => nothing ) do
1970
1970
prompt = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no -e "using REPL; print(REPL.Pkg_promptf())"` )
1971
1971
@test prompt == " (@v$(VERSION . major) .$(VERSION . minor) ) pkg> "
1972
1972
end
1973
1973
1974
+ # Issue 55850
1975
+ tmp_55850 = mktempdir ()
1976
+ tmp_sym_link = joinpath (tmp_55850, " sym" )
1977
+ symlink (tmp_55850, tmp_sym_link; dir_target= true )
1978
+ withenv (" JULIA_DEPOT_PATH" => tmp_sym_link * (Sys. iswindows () ? " ;" : " :" ), " JULIA_LOAD_PATH" => nothing ) do
1979
+ prompt = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no -e "using REPL; print(REPL.projname(REPL.find_project_file()))"` )
1980
+ @test prompt == " @v$(VERSION . major) .$(VERSION . minor) "
1981
+ end
1982
+
1974
1983
get_prompt (proj:: String ) = readchomp (` $(Base. julia_cmd ()[1 ]) --startup-file=no $(proj) -e "using REPL; print(REPL.Pkg_promptf())"` )
1975
1984
1976
1985
@test get_prompt (" --project=$(pkgdir (REPL)) " ) == " (REPL) pkg> "
You can’t perform that action at this time.
0 commit comments