From ec5ddfd3eb7802aa77ca8262f1e8d09ec9374c77 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Thu, 1 Dec 2016 15:29:57 -0800 Subject: [PATCH] helpers: fix error handling for dependency checks Because 'set -e' is enabled for init-mix.sh, the exit status of 'type' is not checked, so an error raised by 'type' would exit immediately, not running the $? conditional logic. To fix, disable 'set -e' for the dependency check function. Signed-off-by: Patrick McCarty --- helpers | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers b/helpers index bf43d7b..8b3824a 100644 --- a/helpers +++ b/helpers @@ -20,11 +20,13 @@ REPODIR= RPMDIR= check_dep() { + set +e type $1 &> /dev/null if [ $? -ne 0 ]; then echo "$1 program not found... Unable to continue" exit 1 fi + set -e } check_deps() {