Fix shellcheck SC2181[1] - check exit code directly. Signed-off-by: Kent Gibson <warthog618@xxxxxxxxx> [1] https://www.shellcheck.net/wiki/SC2181 --- tools/gpio-tools-test.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/gpio-tools-test.bash b/tools/gpio-tools-test.bash index d9930f1..83b05ec 100755 --- a/tools/gpio-tools-test.bash +++ b/tools/gpio-tools-test.bash @@ -3069,8 +3069,7 @@ check_kernel() { check_prog() { local PROG=$1 - which "$PROG" > /dev/null - if [ "$?" -ne "0" ] + if ! which "$PROG" > /dev/null then die "$PROG not found - needed to run the tests" fi -- 2.39.2