@@ -86,31 +86,33 @@ 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_default_depot_path! (DEPOT_PATH ; only_bundled:: Bool )
90+ if ! only_bundled
91+ path = joinpath (homedir (), " .julia" )
92+ path in DEPOT_PATH || push! (DEPOT_PATH , path)
93+ end
9294 path = abspath (Sys. BINDIR, " .." , " local" , " share" , " julia" )
9395 path in DEPOT_PATH || push! (DEPOT_PATH , path)
9496 path = abspath (Sys. BINDIR, " .." , " share" , " julia" )
9597 path in DEPOT_PATH || push! (DEPOT_PATH , path)
9698 return DEPOT_PATH
9799end
98100
99- function init_depot_path ()
101+ function init_depot_path (; only_bundled :: Bool = false )
100102 empty! (DEPOT_PATH )
101103 if haskey (ENV , " JULIA_DEPOT_PATH" )
102104 str = ENV [" JULIA_DEPOT_PATH" ]
103105 isempty (str) && return
104106 for path in eachsplit (str, Sys. iswindows () ? ' ;' : ' :' )
105107 if isempty (path)
106- append_default_depot_path! (DEPOT_PATH )
108+ append_default_depot_path! (DEPOT_PATH ; only_bundled )
107109 else
108110 path = expanduser (path)
109111 path in DEPOT_PATH || push! (DEPOT_PATH , path)
110112 end
111113 end
112114 else
113- append_default_depot_path! (DEPOT_PATH )
115+ append_default_depot_path! (DEPOT_PATH ; only_bundled )
114116 end
115117 nothing
116118end
0 commit comments