Skip to content

Commit

Permalink
pushfirst to standard_loadpath during init
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 18, 2024
1 parent d114733 commit 3c28d82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/DataDeps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ datadeps_scratch_dir = ""

function __init__()
global datadeps_scratch_dir = @get_scratch!("datadeps")
pushfirst!(standard_loadpath, datadeps_scratch_dir)
end

function _precompile_()
Expand Down
3 changes: 2 additions & 1 deletion src/locations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const standard_loadpath = joinpath.([
"/usr/share", "/usr/local/share"] # Unix Filestructure
end], "datadeps")

pushfirst!(standard_loadpath, joinpath(Base.DEPOT_PATH, "datadeps"))
# NOTE: the scratchspace is pushed to the front during __init__()


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

0 comments on commit 3c28d82

Please sign in to comment.