From 0f71de045e7720ed69ab95c05ce270a4248014fc Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Tue, 30 Jul 2024 17:09:11 +0800 Subject: [PATCH] brew.sh: fix `brew -v` `brew -v` was previously equivalent to `brew --version`, but it currently returns the output of `brew help`. (This also occurs with `brew -x`, where x is any single character.) This is because the `-?` pattern matches `-` followed by any single character. We need to quote it to capture the intended meaning. --- Library/Homebrew/brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index f837c599d3..4eaef4b5f6 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -166,7 +166,7 @@ case "$@" in homebrew-list "$@" && exit 0 ;; # falls back to cmd/help.rb on a non-zero return - help | --help | -h | --usage | -? | "") + help | --help | -h | --usage | "-?" | "") homebrew-help "$@" && exit 0 ;; esac