Skip to content

Commit

Permalink
The behavior of download_artifacts has changed in Julia 1.8+ (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Jun 23, 2022
1 parent 04e3361 commit 2c98822
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/test_img/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ function ensure_artifact_exists_locally(; treehash, url)
throw(ArgumentError(error_msg))
end
@info("Artifact did not exist locally, downloading")
was_success = Pkg.Artifacts.download_artifact(treehash, url; verbose=true)
was_success || throw(ErrorException("Download was not a success"))
return_value = Pkg.Artifacts.download_artifact(treehash, url; verbose=true)
if return_value === true
@debug "Download was a success"
else
@debug "The return value from `download_artifact` was not `true`" return_value
if !(return_value isa Bool)
throw(return_value)
end
throw(ErrorException("Download was not a success"))
end
end
Pkg.Artifacts.artifact_exists(treehash) || throw(ErrorException("Could not download the artifact"))
return nothing
Expand Down

0 comments on commit 2c98822

Please sign in to comment.