From 3db381b0bec0f8f36351d431aae723654e4261ae Mon Sep 17 00:00:00 2001 From: rami3l Date: Mon, 14 Oct 2024 10:04:39 +0800 Subject: [PATCH] style(rustup-init/sh): ignore `shellcheck` SC2086 false positives 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. --- rustup-init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rustup-init.sh b/rustup-init.sh index 93d86ed2e3..58153aee0d 100755 --- a/rustup-init.sh +++ b/rustup-init.sh @@ -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