diff --git a/scripts/build.sh b/scripts/build.sh index 47f8a042b..cf44e0713 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -12,8 +12,11 @@ set -e function validateToolPresence { local TOOLNAME=$1 - which ${TOOLNAME} >/dev/null || echo "${TOOLNAME} is not on the path. Exiting..." - exit 1 + which ${TOOLNAME} >/dev/null + if [ $? -ne 0 ]; then + echo "${TOOLNAME} is not on the path. Exiting..." + exit 1 + fi } # Validates that all used tools are present; exits when any is not found