diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 0f9b6355f4c44f4ef1f7db0d1f12f765a582fa89..8dd610a6040e16273c4cc50e64a56269903812ba 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -657,7 +657,7 @@ EOS if [[ "${UPSTREAM_SHA_HTTP_CODE}" == "404" ]] then - TAP="${DIR#${HOMEBREW_LIBRARY}/Taps/}" + TAP="${DIR#"${HOMEBREW_LIBRARY}"/Taps/}" echo "${TAP} does not exist! Run \`brew untap ${TAP}\` to remove it." >>"${update_failed_file}" else echo "Fetching ${DIR} failed!" >>"${update_failed_file}" diff --git a/Library/Homebrew/completions/bash.erb b/Library/Homebrew/completions/bash.erb index 71a72e66247f05bc6415f6d4cb10231994177cec..b9f52a2cd98364f5a13f84875c37f0a955781f21 100644 --- a/Library/Homebrew/completions/bash.erb +++ b/Library/Homebrew/completions/bash.erb @@ -105,7 +105,7 @@ __brew_complete_tapped() { for dir in "${taplib}"/*/* do [[ -d "${dir}" ]] || continue - dir="${dir#${taplib}/}" + dir="${dir#"${taplib}"/}" dir="${dir/homebrew-/}" taps="${taps} ${dir}" done diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index 872004000c92f8f9f32e4f18e3e8d119ad301f5b..c240798dfb49226f6441095c60a022c56cc81b38 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -167,7 +167,16 @@ module Homebrew def run_shellcheck(files, output_type) files = shell_scripts if files.blank? - args = ["--shell=bash", "--enable=all", "--external-sources", "--source-path=#{HOMEBREW_LIBRARY}", "--", *files] + args = [ + "--shell=bash", + "--enable=all", + "--external-sources", + "--source-path=#{HOMEBREW_LIBRARY}", + # TODO: fix these + "--exclude=SC2310,SC2311,SC2312", + "--", + *files, + ] case output_type when :print diff --git a/bin/brew b/bin/brew index ac635ce4f4b005980cdf37962def7c42f7f99d25..1c8fe3c6e31123c4f6fbecfb11feedffcaab4dcd 100755 --- a/bin/brew +++ b/bin/brew @@ -2,6 +2,7 @@ # Fail fast with concise message when not using bash # Single brackets is needed here for POSIX compatibility +# shellcheck disable=SC2292 if [ -z "${BASH_VERSION:-}" ] then echo "Error: Bash is required to run brew." >&2 diff --git a/completions/bash/brew b/completions/bash/brew index 55b139d0acb3bcc7b8683569d55e58d1b4599812..561175ff3e78e8c95ec3535a574e6516eedaf962 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -92,7 +92,7 @@ __brew_complete_tapped() { for dir in "${taplib}"/*/* do [[ -d "${dir}" ]] || continue - dir="${dir#${taplib}/}" + dir="${dir#"${taplib}"/}" dir="${dir/homebrew-/}" taps="${taps} ${dir}" done