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)
This commit is contained in:
parent
2be11f6040
commit
b93ed4124c
@ -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" ]]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user