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

WIP: Use the Base.depot_path() function (instead of accessing the Base.DEPOT_PATH vector directly) #1728

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/Pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export UpgradeLevel, UPLEVEL_MAJOR, UPLEVEL_MAJOR, UPLEVEL_MINOR, UPLEVEL_PATCH
export PreserveLevel, PRESERVE_TIERED, PRESERVE_ALL, PRESERVE_DIRECT, PRESERVE_SEMVER, PRESERVE_NONE
export Registry, RegistrySpec

depots() = Base.DEPOT_PATH
depots() = Base.depot_path()
function depots1()
d = depots()
isempty(d) && Pkg.Types.pkgerror("no depots found in DEPOT_PATH")
isempty(d) && Pkg.Types.pkgerror("no depots found in Base.depot_path()")
return d[1]
end

Expand Down
2 changes: 1 addition & 1 deletion src/REPLMode/REPLMode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function projname(project_file::String)
else
name = project.name
end
for depot in Base.DEPOT_PATH
for depot in Base.depot_path()
envdir = joinpath(depot, "environments")
if startswith(abspath(project_file), abspath(envdir))
return "@" * name
Expand Down
2 changes: 1 addition & 1 deletion src/REPLMode/completions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
########################
function _shared_envs()
possible = String[]
for depot in Base.DEPOT_PATH
for depot in Base.depot_path()
envdir = joinpath(depot, "environments")
isdir(envdir) || continue
append!(possible, readdir(envdir))
Expand Down