From 6baed1ff66d3bffc6e9ac18d212344f986cfa9d4 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Wed, 22 Jun 2016 00:37:56 +0000 Subject: [PATCH] Prevent loading user's aria2.conf (yyuu/pyenv#625) --- bin/ruby-build | 4 ++-- test/fetch.bats | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ruby-build b/bin/ruby-build index b26ae51f47..8851a69bd9 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -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 diff --git a/test/fetch.bats b/test/fetch.bats index 5286712df9..0bc450a8bc 100644 --- a/test/fetch.bats +++ b/test/fetch.bats @@ -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