Skip to content

Commit 579df85

Browse files
authored
Merge pull request #9 from joa-quim/use-curl-instead-of-downloads
Replace Downloads.jl with curl
2 parents 0c2a859 + 21de77c commit 579df85

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎src/F3D.jl‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module F3D
22

3-
using Downloads
43

54
"""
65
_get_asset_filter() -> (os, arch, ext)
@@ -37,9 +36,8 @@ function _find_asset_url()
3736

3837
local body::String
3938
tmp = tempname()
40-
downloader = Downloads.Downloader()
4139
try
42-
Downloads.download(api_url, tmp; headers = ["Accept" => "application/vnd.github.v3+json"], downloader = downloader)
40+
run(`curl -sL -H "Accept: application/vnd.github.v3+json" -o $tmp $api_url`)
4341
body = read(tmp, String)
4442
catch e
4543
error("Failed to query GitHub API: $e")
@@ -162,12 +160,10 @@ function ensure_f3d()
162160
archive_path = joinpath(lib_dir, archive_name)
163161

164162
@info "Downloading F3D from $url ..."
165-
downloader = Downloads.Downloader()
166163
try
167-
Downloads.download(url, archive_path; downloader = downloader)
164+
run(`curl -sL -o $archive_path $url`)
168165
catch e
169166
error("Failed to download F3D: $e")
170-
finally
171167
end
172168
@info "Download complete: $archive_path"
173169

0 commit comments

Comments
 (0)