Skip to content

Commit

Permalink
Update src/locations.jl
Browse files Browse the repository at this point in the history
IanButterworth committed Jan 18, 2024

Verified

This commit was signed with the committer’s verified signature.
IanButterworth Ian Butterworth
1 parent ee16c3d commit d114733
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/locations.jl
Original file line number Diff line number Diff line change
@@ -15,15 +15,7 @@ const standard_loadpath = joinpath.([
"/usr/share", "/usr/local/share"] # Unix Filestructure
end], "datadeps")

if VERSION > v"1.6.0-0"
# Scratch.jl works correctly with Julia 1.0 and above.
# However, Pkg's built-in garbage collection, i.e. Pkg.gc(), is only aware of
# scratchspaces for Julia 1.6 and above so use the more user accessible DEPOT/datadeps location
# for visibility to the user for space management
pushfirst!(standard_loadpath, datadeps_scratch_dir)
else
pushfirst!(standard_loadpath, joinpath(Base.DEPOT_PATH, "datadeps"))
end
pushfirst!(standard_loadpath, joinpath(Base.DEPOT_PATH, "datadeps"))

# ensure at least something in the loadpath exists when instaleld
mkpath(first(standard_loadpath))

0 comments on commit d114733

Please sign in to comment.