@@ -181,7 +181,6 @@ function set_load_path!(LOAD_PATH; module_name="")
181181
182182 empty! (LOAD_PATH )
183183 push! (LOAD_PATH , " @" , " @stdlib" )
184- # isempty(module_name) ? push!(LOAD_PATH, joinpath(Sys.STDLIB, "MainEnv")) : push!(LOAD_PATH, joinpath(Sys.STDLIB, module_name))
185184 push! (LOAD_PATH , joinpath (Sys. STDLIB, module_name))
186185
187186end
@@ -242,7 +241,6 @@ function set_depot_path_macos!(DEPOT_PATH::Vector{String}; app_name)
242241 global USER_DATA = joinpath (homedir (), " .config" , app_name)
243242 end
244243
245- # Modify DEPOT_PATH (equivalent to JULIA_DEPOT_PATH)
246244 empty! (DEPOT_PATH )
247245 push! (DEPOT_PATH , user_depot, joinpath (dirname (Sys. BINDIR), " share/julia" ))
248246
@@ -252,17 +250,15 @@ end
252250function set_depot_path_snap! (DEPOT_PATH :: Vector{String} )
253251
254252 empty! (DEPOT_PATH )
255- push! (DEPOT_PATH , dirname (dirname (Sys. STDLIB)))
256253
257254 if haskey (ENV , " SNAP" )
258255 @info " Application running as SNAP"
259256
260257 global USER_DATA = ENV [" SNAP_USER_DATA" ]
261258
262- # correct
263- pushfirst! (DEPOT_PATH , ENV [" SNAP_DATA" ])
264- pushfirst! (DEPOT_PATH , ENV [" SNAP_USER_COMMON" ])
265-
259+ push! (DEPOT_PATH , ENV [" SNAP_USER_COMMON" ])
260+ push! (DEPOT_PATH , ENV [" SNAP_DATA" ])
261+
266262 else
267263 @info " Application running in bare host environment."
268264
@@ -272,10 +268,12 @@ function set_depot_path_snap!(DEPOT_PATH::Vector{String})
272268 global USER_DATA = mktempdir ()
273269 end
274270
275- pushfirst ! (DEPOT_PATH , joinpath (USER_DATA, " cache" ))
271+ push ! (DEPOT_PATH , joinpath (USER_DATA, " cache" ))
276272
277273 end
278274
275+ push! (DEPOT_PATH , dirname (dirname (Sys. STDLIB)))
276+
279277 return
280278end
281279
@@ -382,8 +380,8 @@ function init(;
382380 return
383381end
384382
385- function reset_cache ()
386383
384+ function reset_cache ()
387385
388386 pkg = Base. PkgId (Base. UUID (" 9f11263e-cf0d-4932-bae6-807953dbea74" ), " AppEnv" )
389387 cache_dir = Base. compilecache_path (pkg)
@@ -395,8 +393,5 @@ function reset_cache()
395393
396394end
397395
398- function __init__ ()
399- # reset_cache()
400- end
401396
402397end # module AppEnv
0 commit comments