From 24fd23493dd5cc3895a84f9668796039a96b7385 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Thu, 2 Mar 2017 15:54:58 -0800 Subject: [PATCH] Exit script immediately if we can't update package cache. Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 219b08cb..713f8337 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -741,7 +741,8 @@ update_package_cache() { if eval ${UPDATE_PKG_CACHE} &> /dev/null; then echo " done!" else - echo -n "\n!!! ERROR - Unable to update package cache. Please try \"${UPDATE_PKG_CACHE}\"" + echo -en "\n!!! ERROR - Unable to update package cache. Please try \"${UPDATE_PKG_CACHE}\"" + return 1 fi } @@ -1209,7 +1210,7 @@ main() { fi # Update package cache - update_package_cache + update_package_cache || exit 1 # Notify user of package availability notify_package_updates_available