From 357cd059aad23e69a320e4c97bb51b08f128d72f Mon Sep 17 00:00:00 2001 From: William Wernert Date: Thu, 20 Jan 2022 13:53:59 -0500 Subject: [PATCH] Use ret_code in prereq function to return failures --- setup/so-preflight | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup/so-preflight b/setup/so-preflight index 7719bc966..4af43892d 100755 --- a/setup/so-preflight +++ b/setup/so-preflight @@ -169,11 +169,15 @@ __check_url_arr() { } preflight_prereqs() { + local ret_code=0 + if [[ $OS == 'centos' ]]; then : # no-op to match structure of other checks for $OS var else - retry 50 10 "apt-get -y install curl" >> "$preflight_log" 2>&1 || exit 1 + retry 50 10 "apt-get -y install curl" >> "$preflight_log" 2>&1 || ret_code=1 fi + + return $ret_code } main() { @@ -190,6 +194,7 @@ main() { else echo "$intro_str" | tee "$preflight_log" fi + check_default_repos &&\ preflight_prereqs &&\ check_new_repos &&\