diff options
| author | Michka Popoff | 2017-10-27 15:54:24 +0200 |
|---|---|---|
| committer | Michka Popoff | 2017-10-27 15:54:24 +0200 |
| commit | b93ed4124c8dd9299b19f3fb82d1489dd30eb31a (patch) | |
| tree | a7a1f2ff795a890fc8785fc76981f038e4cccca8 /Library/Homebrew/utils | |
| parent | 2be11f604005ea20b582cec2daea2315ec867f66 (diff) | |
| download | brew-b93ed4124c8dd9299b19f3fb82d1489dd30eb31a.tar.bz2 | |
lock.sh: suppress error output when looking for flock
Fixes (on centos6):
which: no flock in (/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
Diffstat (limited to 'Library/Homebrew/utils')
| -rw-r--r-- | Library/Homebrew/utils/lock.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/utils/lock.sh b/Library/Homebrew/utils/lock.sh index 7f2bb8b73..e7fe348aa 100644 --- a/Library/Homebrew/utils/lock.sh +++ b/Library/Homebrew/utils/lock.sh @@ -45,7 +45,7 @@ _create_lock() { if [[ -x "$ruby" ]] && "$ruby" -e "exit(RUBY_VERSION >= '1.8.7')" then "$ruby" -e "File.new($lock_fd).flock(File::LOCK_EX | File::LOCK_NB) || exit(1)" - elif [[ -x "$(which flock)" ]] + elif [[ -x "$(which flock 2>/dev/null)" ]] then flock -n "$lock_fd" elif [[ -x "$python" ]] |
