@@ -86,9 +86,7 @@ See also [`JULIA_DEPOT_PATH`](@ref JULIA_DEPOT_PATH), and
8686"""
8787const DEPOT_PATH = String[]
8888
89- function append_default_depot_path! (DEPOT_PATH )
90- path = joinpath (homedir (), " .julia" )
91- path in DEPOT_PATH || push! (DEPOT_PATH , path)
89+ function append_bundled_depot_path! (DEPOT_PATH )
9290 path = abspath (Sys. BINDIR, " .." , " local" , " share" , " julia" )
9391 path in DEPOT_PATH || push! (DEPOT_PATH , path)
9492 path = abspath (Sys. BINDIR, " .." , " share" , " julia" )
9896
9997function init_depot_path ()
10098 empty! (DEPOT_PATH )
99+ populated = false
100+
101101 if haskey (ENV , " JULIA_DEPOT_PATH" )
102102 str = ENV [" JULIA_DEPOT_PATH" ]
103- isempty (str) && return
104103 for path in eachsplit (str, Sys. iswindows () ? ' ;' : ' :' )
105- if isempty (path)
106- append_default_depot_path! (DEPOT_PATH )
107- else
108- path = expanduser (path)
109- path in DEPOT_PATH || push! (DEPOT_PATH , path)
110- end
104+ isempty (path) && continue
105+ path = expanduser (path)
106+ path in DEPOT_PATH || push! (DEPOT_PATH , path)
107+ populated = true
111108 end
112- else
113- append_default_depot_path! (DEPOT_PATH )
114109 end
115- nothing
110+
111+ if ! populated
112+ path = joinpath (homedir (), " .julia" )
113+ push! (DEPOT_PATH , path)
114+ end
115+
116+ append_bundled_depot_path! (DEPOT_PATH )
117+
118+ return
116119end
117120
118121# # LOAD_PATH & ACTIVE_PROJECT ##
0 commit comments