Merge pull request #3381 from iMichka/flock
lock.sh: suppress error output when looking for flock
This commit is contained in:
commit
b2e2e4b917
@ -45,7 +45,7 @@ _create_lock() {
|
|||||||
if [[ -x "$ruby" ]] && "$ruby" -e "exit(RUBY_VERSION >= '1.8.7')"
|
if [[ -x "$ruby" ]] && "$ruby" -e "exit(RUBY_VERSION >= '1.8.7')"
|
||||||
then
|
then
|
||||||
"$ruby" -e "File.new($lock_fd).flock(File::LOCK_EX | File::LOCK_NB) || exit(1)"
|
"$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
|
then
|
||||||
flock -n "$lock_fd"
|
flock -n "$lock_fd"
|
||||||
elif [[ -x "$python" ]]
|
elif [[ -x "$python" ]]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user