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 <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2016-12-01 15:29:57 -08:00
committed by tmarcu
parent bf7f6c5f16
commit ec5ddfd3eb
+2
View File
@@ -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() {