From 932b15dda9ca5b82721fee4ed6116593e9fd736a Mon Sep 17 00:00:00 2001 From: Jorge Morante Date: Fri, 6 Oct 2017 18:46:25 +0200 Subject: [PATCH] fix program_exists ( LOL ) --- scripts/health-check.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/health-check.sh b/scripts/health-check.sh index 7106922..1aa655d 100755 --- a/scripts/health-check.sh +++ b/scripts/health-check.sh @@ -32,10 +32,12 @@ function version_minor() { function program_exists() { local prog="$1" - if [[ $(which "$prog" &> /dev/null) ]]; then - echo "0" - else + which "$prog" &> /dev/null + + if [[ $? == "0" ]]; then echo "1" + else + echo "0" fi }