Skip to content

Commit

Permalink
Use curl temporarily until Downloads fixes make their way into `1…
Browse files Browse the repository at this point in the history
….6` (#54)

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
  • Loading branch information
staticfloat and giordano committed Oct 20, 2020
1 parent 2022194 commit 2f9e354
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ArchiveUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,15 @@ function download_verify(url, hash, path)
if isfile(path) && verify(path, hash)
@info "Cached file found in $(path)"
else
mkpath(dirname(path))
@info "Downloading $(url) to $(path)..."
Downloads.download(url, path)
# Temporarily shell out to `curl` to download, until `Downloads` bugs are squashed
try
run(`curl -C - -s -\# -f -L $(url) -o $(path)`)
catch e
# Downloads throws an ErrorException, so we'll do the same
error("download failed: $(e)")
end
verify(path, hash) || error("Verification failed")
end
end

0 comments on commit 2f9e354

Please sign in to comment.