diff --git a/upstreams.sh b/upstreams.sh index 8c2147d8..2543a5b8 100755 --- a/upstreams.sh +++ b/upstreams.sh @@ -93,9 +93,9 @@ for part in "${parts[@]}"; do [ -f "$input_file" ] || input_file="$BASEPATH/default.cfg" # Run envsubst to replace environment variables in the input file and save the result to the output file - if yq e '.upstreams' $part >/dev/null 2>&1; then + if yq e '.upstreams' $BASEPATH/$part >/dev/null 2>&1; then echo "upstreams key exists" - upstreams+=("$(yq e '.upstreams' $part | sed 's/^/ /' | envsubst)") + upstreams+=("$(yq e '.upstreams' $BASEPATH/$part | sed 's/^/ /' | envsubst)") else upstreams+=("$(envsubst < "$input_file")") echo "upstreams key does not exist"