aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar a1346054 <36859588+a1346054@users.noreply.github.com>2022-09-13 18:42:15 +0000
committerLibravatar a1346054 <36859588+a1346054@users.noreply.github.com>2022-09-13 22:37:18 +0000
commite04d6b7bf58a95105a8fc79fcde7c0e98875e72a (patch)
tree6e20913ed5d4af3e1b0ef5a31ef80ee42f651376 /contrib
parenttests: fix unintentional overwriting of array value (diff)
downloadfirejail-e04d6b7bf58a95105a8fc79fcde7c0e98875e72a.tar.gz
firejail-e04d6b7bf58a95105a8fc79fcde7c0e98875e72a.tar.zst
firejail-e04d6b7bf58a95105a8fc79fcde7c0e98875e72a.zip
tests: directly test for presence of command
Test directly for presence of command instead of indirectly testing the return code. Additionally: * uses a shell builtin `command -v` instead of external `which` * `command -v` is the standardized version of `which`
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/gdb-firejail.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/gdb-firejail.sh b/contrib/gdb-firejail.sh
index 397438e1e..35348088e 100755
--- a/contrib/gdb-firejail.sh
+++ b/contrib/gdb-firejail.sh
@@ -17,7 +17,7 @@ if [ -z "${1##*/firejail}" ]; then
17else 17else
18 # First argument is not named firejail, then add default unless environment 18 # First argument is not named firejail, then add default unless environment
19 # variable already set. 19 # variable already set.
20 set -- ${FIREJAIL:=$(which firejail)} "$@" 20 set -- ${FIREJAIL:=$(command -v firejail)} "$@"
21fi 21fi
22 22
23bash -c "kill -STOP \$\$; exec \"\$0\" \"\$@\"" "$@" & 23bash -c "kill -STOP \$\$; exec \"\$0\" \"\$@\"" "$@" &