Skip to content

Commit

Permalink
BUG/MINOR: yana-ls: Fix handling of the YANA_CURL_OPTIONS env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
julthomas committed Nov 19, 2023
1 parent 6dd4773 commit 97e43c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/yana-ls
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ done
shopt -u extglob

function _curl() {
# YANA_CURL_OPTIONS is not an array as it may come from the environment;
# assume set -f was set to prevent pathname expansion.
curl --connect-timeout "$TIMEOUT" -f -sS $YANA_CURL_OPTIONS "$@"
# YANA_CURL_OPTIONS is not an array as it may come from the environment
declare "yana_curl_options=( $YANA_CURL_OPTIONS )"
curl --connect-timeout "$TIMEOUT" -f -sS "${yana_curl_options[@]}" "$@"
}

function fatal() { echo "FATAL: $PROGNAME: $*" >&2; exit 2; }
Expand Down

0 comments on commit 97e43c3

Please sign in to comment.