Skip to content
Snippets Groups Projects
Commit b93ed412 authored by Michka Popoff's avatar Michka Popoff
Browse files

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)
parent 2be11f60
No related branches found
No related tags found
No related merge requests found
......@@ -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" ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment