Skip to content

Commit 1728ada

Browse files
authored
Add busybox to download agents (JuliaLang#35404)
I was puzzled that `Pkg` worked on a machine with busybox but `download` didn't.
1 parent 8a5b323 commit 1728ada

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

base/download.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,17 @@ function download(url::AbstractString, filename::AbstractString)
6969
rm(filename, force=true) # wget always creates a file
7070
rethrow()
7171
end
72+
elseif Sys.which("busybox") !== nothing
73+
try
74+
run(`busybox wget -O $filename $url`)
75+
catch
76+
rm(filename, force=true) # wget always creates a file
77+
rethrow()
78+
end
7279
elseif Sys.which("fetch") !== nothing
7380
run(`fetch -f $filename $url`)
7481
else
75-
error("No download agent available; install curl, wget, or fetch.")
82+
error("No download agent available; install curl, wget, busybox or fetch.")
7683
end
7784
return filename
7885
end

0 commit comments

Comments
 (0)