diff options
| author | Xu Cheng | 2016-05-10 20:16:25 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-05-12 15:36:46 +0800 |
| commit | 1b6a200809ce5963795a0d60bacd72dc40d7692e (patch) | |
| tree | c5aa8c332e8b235bf0ccb5461caa4f6485898502 | |
| parent | ad8f50ec6df6d6160f1fcea895f4338233d19476 (diff) | |
| download | brew-1b6a200809ce5963795a0d60bacd72dc40d7692e.tar.bz2 | |
update: use lock
Closes #181.
Signed-off-by: Xu Cheng <xucheng@me.com>
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 9679c0f8e..0ad66b8b4 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -5,6 +5,8 @@ #: If `--merge` is specified then `git merge` is used to include updates #: (rather than `git rebase`). +source "$HOMEBREW_LIBRARY/Homebrew/utils/lock.sh" + brew() { "$HOMEBREW_BREW_FILE" "$@" } @@ -307,6 +309,9 @@ EOS # ensure GIT_CONFIG is unset as we need to operate on .git/config unset GIT_CONFIG + # only allow one instance of brew update + lock update + chdir "$HOMEBREW_REPOSITORY" git_init_if_necessary # rename Taps directories |
