diff options
| author | Martin Afanasjew | 2016-06-28 21:35:49 +0200 |
|---|---|---|
| committer | Martin Afanasjew | 2016-06-29 13:38:50 +0200 |
| commit | d4f5f0cec768df07f813aee1e5df2c687a0ad186 (patch) | |
| tree | 0cb27b6b8a1b8229f59165e357d2ff2e49d8717e /Library/Homebrew | |
| parent | 359b67c6c8f6262b2e3b05b8a6716ba32ec65c89 (diff) | |
| download | brew-d4f5f0cec768df07f813aee1e5df2c687a0ad186.tar.bz2 | |
brew.sh: rename 'chdir' to 'safe_cd'
This is inspired by `safe_system` with basically the same implication
(fail on error), making the name a lot less confusing and avoiding a
clash with the `chdir` function previously defined in `bin/brew`.
Closes #414.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 4298daab6..aafae7240 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -311,7 +311,7 @@ EOS # only allow one instance of brew update lock update - chdir "$HOMEBREW_REPOSITORY" + safe_cd "$HOMEBREW_REPOSITORY" git_init_if_necessary # rename Taps directories # this procedure will be removed in the future if it seems unnecessary @@ -382,7 +382,7 @@ EOS pull "$DIR" done - chdir "$HOMEBREW_REPOSITORY" + safe_cd "$HOMEBREW_REPOSITORY" if [[ -n "$HOMEBREW_UPDATED" || -n "$HOMEBREW_UPDATE_FAILED" || |
