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

Merge pull request #620 from yyuu/workaround-aria2c-stdout

Write remote content on stdout with `aria2c`
This commit is contained in:
Yamashita, Yuu
2016-06-02 11:04:41 +09:00
4 changed files with 26 additions and 21 deletions

View File

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