dbuck is broken on Linux
Created by: davido
running dbuck
on Linux:
uname -a
Linux l4.1.34-33-default #1 SMP PREEMPT Thu Oct 20 08:03:29 UTC 2016 (fe18aba) x86_64 x86_64 x86_64 GNU/Linux
is failing for me with:
$ dbuck build gerrit
tail: cannot open ‘+2’ for reading: No such file or directory
when i replace tail +2
with tail -2
in this line, it's failing with different error:
$ lsof -i:8888 | tail -2 | awk '{ print $2 }' | xargs -L1 kill -9
kill: not enough arguments
It's also clear why: there is no such process. There is this xargs
option
-r, --no-run-if-empty
If the standard input does not contain any nonblanks, do not run the command. Normally, the command is run once even if there is no input. This option is a
GNU extension.
so that the fix on Linux is:
lsof -i:8888 | tail -2 | awk '{ print $2 }' | xargs -rL1 kill -9