From 1030f0fa47b65d78eb9ffbdf94f0623a08d19b97 Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Thu, 23 Jul 2020 11:50:52 +0200 Subject: [PATCH] check for binary in more BASHy way --- install.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install.sh b/install.sh index a9daf9b9..5bd699cc 100755 --- a/install.sh +++ b/install.sh @@ -131,13 +131,10 @@ fail_trap() { # testVersion tests the installed client to make sure it is working. testVersion() { - set +e - K3D="$(which $APP_NAME)" - if [ "$?" = "1" ]; then + if ! command -v $APP_NAME &> /dev/null; then echo "$APP_NAME not found. Is $K3D_INSTALL_DIR on your "'$PATH?' exit 1 fi - set -e echo "Run '$APP_NAME --help' to see what you can do with it." }