1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-10 12:33:48 -05:00

Prevent loading user's aria2.conf (fixes #625)

This commit is contained in:
Yamashita, Yuu
2016-06-22 00:38:38 +00:00
parent f64f7c7c49
commit c4e012d5e3
2 changed files with 17 additions and 2 deletions

View File

@@ -336,12 +336,12 @@ http() {
}
http_head_aria2c() {
aria2c --dry-run ${ARIA2_OPTS} "$1" >&4 2>&1
aria2c --dry-run --no-conf=true ${ARIA2_OPTS} "$1" >&4 2>&1
}
http_get_aria2c() {
local out="${2:-$(mktemp "out.XXXXXX")}"
if aria2c --allow-overwrite=true -o "${out}" ${ARIA2_OPTS} "$1" >&4; then
if aria2c --allow-overwrite=true --no-conf=true -o "${out}" ${ARIA2_OPTS} "$1" >&4; then
[ -n "$2" ] || cat "${out}"
else
false