Skip to content

Commit

Permalink
style(rustup-init/sh): ignore shellcheck SC2086 false positives
Browse files Browse the repository at this point in the history
Since we're really using `$_retry` for command building,
this is clearly an exception to the SC2086 rule,
as listed in https://www.shellcheck.net/wiki/SC2086.
  • Loading branch information
rami3l authored and djc committed Oct 14, 2024
1 parent 0e8cf1a commit 3db381b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -638,15 +638,18 @@ downloader() {
get_ciphersuites_for_curl
_ciphersuites="$RETVAL"
if [ -n "$_ciphersuites" ]; then
# shellcheck disable=SC2086
_err=$(curl $_retry --proto '=https' --tlsv1.2 --ciphers "$_ciphersuites" --silent --show-error --fail --location "$1" --output "$2" 2>&1)
_status=$?
else
warn "Not enforcing strong cipher suites for TLS, this is potentially less secure"
if ! check_help_for "$3" curl --proto --tlsv1.2; then
warn "Not enforcing TLS v1.2, this is potentially less secure"
# shellcheck disable=SC2086
_err=$(curl $_retry --silent --show-error --fail --location "$1" --output "$2" 2>&1)
_status=$?
else
# shellcheck disable=SC2086
_err=$(curl $_retry --proto '=https' --tlsv1.2 --silent --show-error --fail --location "$1" --output "$2" 2>&1)
_status=$?
fi
Expand Down

0 comments on commit 3db381b

Please sign in to comment.