Skip to content

Commit

Permalink
brew.sh: fix brew -v
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
carlocab committed Jul 30, 2024
1 parent cae9660 commit 0f71de0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f71de0

Please sign in to comment.