diff options
| author | Xu Cheng | 2016-01-21 18:36:05 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-01-21 21:14:55 +0800 |
| commit | eb54a6b5d5b05bfd9cc910a9633c35821c49c98f (patch) | |
| tree | 2443c81339d675fc0703e5916e354e0d0258bde7 /Library | |
| parent | 58e02496090d45af7c95ad901a8e004620063b28 (diff) | |
| download | brew-eb54a6b5d5b05bfd9cc910a9633c35821c49c98f.tar.bz2 | |
update-bash: handle option flags like -vd
Per @UniqMartin's advice, the original code will fail to handle flags
like `-vd`, because once a case is handled, no other cases are evaluate.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Homebrew/cmd/update-bash.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/update-bash.sh b/Library/Homebrew/cmd/update-bash.sh index e72f3f196..ce80a5a9b 100755 --- a/Library/Homebrew/cmd/update-bash.sh +++ b/Library/Homebrew/cmd/update-bash.sh @@ -243,9 +243,10 @@ update-bash() { --rebase) HOMEBREW_REBASE=1 ;; --simulate-from-current-branch) HOMEBREW_SIMULATE_FROM_CURRENT_BRANCH=1 ;; --*) ;; - -*v*) HOMEBREW_VERBOSE=1 ;; - -*d*) HOMEBREW_DEBUG=1 ;; - -*) ;; + -*) + [[ "$i" = *v* ]] && HOMEBREW_VERBOSE=1; + [[ "$i" = *d* ]] && HOMEBREW_DEBUG=1; + ;; *) odie <<-EOS This command updates brew itself, and does not take formula names. |
