brew.sh: shift -v
to the end of the parameter list earlier.
Fixes #17240
This commit is contained in:
parent
fc13eb83c8
commit
7a61b03e72
@ -508,6 +508,13 @@ HOMEBREW_CORE_REPOSITORY="${HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core"
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
HOMEBREW_CASK_REPOSITORY="${HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask"
|
HOMEBREW_CASK_REPOSITORY="${HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask"
|
||||||
|
|
||||||
|
# Shift the -v to the end of the parameter list
|
||||||
|
if [[ "$1" == "-v" ]]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
set -- "$@" -v
|
||||||
|
fi
|
||||||
|
|
||||||
# commands that take a single or no arguments.
|
# commands that take a single or no arguments.
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--version | -v)
|
--version | -v)
|
||||||
@ -793,13 +800,6 @@ EOS
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "-v" ]]
|
|
||||||
then
|
|
||||||
# Shift the -v to the end of the parameter list
|
|
||||||
shift
|
|
||||||
set -- "$@" -v
|
|
||||||
fi
|
|
||||||
|
|
||||||
for arg in "$@"
|
for arg in "$@"
|
||||||
do
|
do
|
||||||
[[ "${arg}" == "--" ]] && break
|
[[ "${arg}" == "--" ]] && break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user