Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a JET warning #44

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Scratch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
be overridden via `with_scratch_directory()`.
"""
function scratch_dir(args...)
if SCRATCH_DIR_OVERRIDE[] === nothing
override = SCRATCH_DIR_OVERRIDE[]
if override === nothing
return abspath(first(Base.DEPOT_PATH), "scratchspaces", args...)
else
# If we've been given an override, use _only_ that directory.
return abspath(SCRATCH_DIR_OVERRIDE[], args...)
return abspath(override, args...)

Check warning on line 37 in src/Scratch.jl

View check run for this annotation

Codecov / codecov/patch

src/Scratch.jl#L37

Added line #L37 was not covered by tests
end
end

Expand Down
Loading