Skip to content

Commit 5daf773

Browse files
committed
Merge remote-tracking branch 'assisted-by-ai/claude/fix-unbound-variable-2mSBE'
2 parents 9d86171 + bcdfaeb commit 5daf773

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

usr/bin/dist-installer-cli

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2998,9 +2998,6 @@ get_transfer_cmd() {
29982998
#transfer_utility=rsync
29992999
#fi
30003000
transfer_utility=rsync
3001-
transfer_proxy_prefix=()
3002-
transfer_proxy_suffix=()
3003-
curl_transfer_proxy=()
30043001

30053002
case "${transfer_utility}" in
30063003
rsync)
@@ -3282,6 +3279,9 @@ set_transfer_proxy() {
32823279
transfer_proxy_suffix=()
32833280
transfer_proxy_prefix=( 'torsocks' '--isolate' '--address' "${proxy_addr}" '--port' "${proxy_port}" )
32843281
;;
3282+
*)
3283+
die 1 "set_transfer_proxy: unsupported transfer_utility: '${transfer_utility}'"
3284+
;;
32853285
esac
32863286
}
32873287

@@ -3294,6 +3294,12 @@ torify_conn_maybe() {
32943294
if [ ! "${onion}" = "1" ]; then
32953295
if [ -z "${socks_proxy:-}" ]; then
32963296
log notice "Not torifying connection: Due to '--onion' option not being requested (and 'socks_proxy' is unset)."
3297+
## Proxy variables are intentionally initialized here (not in get_transfer_cmd)
3298+
## so that nounset catches any code path that bypasses torify_conn_maybe.
3299+
## The only other place these are set is set_transfer_proxy (tor path).
3300+
transfer_proxy_prefix=()
3301+
transfer_proxy_suffix=()
3302+
curl_transfer_proxy=()
32973303
return 0
32983304
fi
32993305
fi

0 commit comments

Comments
 (0)