Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support shared named environments during startup #40025

Merged
merged 4 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/initdefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function init_active_project()
ACTIVE_PROJECT[] =
project === nothing ? nothing :
project == "" ? nothing :
project == "@." ? current_project() : abspath(expanduser(project))
startswith(project, "@") ? load_path_expand(project) : abspath(expanduser(project))
end

## load path expansion: turn LOAD_PATH entries into concrete paths ##
Expand Down
10 changes: 7 additions & 3 deletions test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no`

# ~ expansion in --project and JULIA_PROJECT
if !Sys.iswindows()
expanded = abspath(expanduser("~/foo"))
@test occursin(expanded, readchomp(`$exename --project='~/foo' -E 'Base.active_project()'`))
@test occursin(expanded, readchomp(setenv(`$exename -E 'Base.active_project()'`, "JULIA_PROJECT" => "~/foo", "HOME" => homedir())))
expanded_a = abspath(expanduser("~/foo"))
@test occursin(expanded_a, readchomp(`$exename --project='~/foo' -E 'Base.active_project()'`))
@test occursin(expanded_a, readchomp(setenv(`$exename -E 'Base.active_project()'`, "JULIA_PROJECT" => "~/foo", "HOME" => homedir())))

expanded_b = abspath(Base.load_path_expand("@foo"))
@test occursin(expanded_b, readchomp(`$exename --project='@foo' -E 'Base.active_project()'`))
@test occursin(expanded_b, readchomp(setenv(`$exename -E 'Base.active_project()'`, "JULIA_PROJECT" => "@foo", "HOME" => homedir())))
end

# --quiet, --banner
Expand Down