Support optional space after -p / --path

Fixes https://github.com/Homebrew/install/issues/724
This commit is contained in:
Nathan Henrie
2023-01-10 10:06:20 -07:00
parent a8c26acd44
commit de786ec51c

View File

@@ -222,6 +222,14 @@ EOS
while [[ $# -gt 0 ]] while [[ $# -gt 0 ]]
do do
case "$1" in case "$1" in
-p)
homebrew_prefix_candidates+=("$2")
shift
;;
--path)
homebrew_prefix_candidates+=("$2")
shift
;;
-p*) homebrew_prefix_candidates+=("${1#-p}") ;; -p*) homebrew_prefix_candidates+=("${1#-p}") ;;
--path=*) homebrew_prefix_candidates+=("${1#--path=}") ;; --path=*) homebrew_prefix_candidates+=("${1#--path=}") ;;
--skip-cache-and-logs) opt_skip_cache_and_logs=1 ;; --skip-cache-and-logs) opt_skip_cache_and_logs=1 ;;