Skip to content

Commit

Permalink
Prevent loading user's aria2.conf (pyenv/pyenv#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyuu committed Jun 22, 2016
1 parent 63e76cc commit 6baed1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,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
Expand Down
2 changes: 1 addition & 1 deletion test/fetch.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ setup() {
}

@test "using aria2c if available" {
stub aria2c "* -o * http://example.com/* : cp $FIXTURE_ROOT/\${4##*/} \$3"
stub aria2c "--allow-overwrite=true --no-conf=true -o * http://example.com/* : cp $FIXTURE_ROOT/\${5##*/} \$4"

install_fixture definitions/without-checksum
assert_success
Expand Down

0 comments on commit 6baed1f

Please sign in to comment.