mirror of
https://github.com/asdf-vm/asdf-nodejs.git
synced 2024-10-06 07:42:08 +08:00
Move "--location" from curl_opts to curl option
Co-authored-by: Augusto Moura <augusto.moura@toptal.com>
This commit is contained in:
parent
81b31c0a4d
commit
9ce1bfc6e3
@ -96,10 +96,10 @@ print_index_tab(){
|
||||
delete_on_exit "$temp_headers_file"
|
||||
|
||||
if [ -r "$etag_file" ]; then
|
||||
curl_opts=(--location --header "If-None-Match: $(cat "$etag_file")")
|
||||
curl_opts=(--header "If-None-Match: $(cat "$etag_file")")
|
||||
fi
|
||||
|
||||
index=$(curl --fail --silent --dump-header "$temp_headers_file" ${curl_opts+"${curl_opts[@]}"} "${NODEJS_ORG_MIRROR}index.tab")
|
||||
index=$(curl --fail --silent --location --dump-header "$temp_headers_file" ${curl_opts+"${curl_opts[@]}"} "${NODEJS_ORG_MIRROR}index.tab")
|
||||
|
||||
if [ "$index" ]; then
|
||||
awk 'tolower($1) == "etag:" { print $2 }' < "$temp_headers_file" > "$etag_file"
|
||||
|
Loading…
Reference in New Issue
Block a user