From 22c454c326885f80936821f4601e465cf46ad84e Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Fri, 13 May 2022 16:46:15 +0000 Subject: [PATCH] close update functino if no updates --- heavy_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heavy_script.sh b/heavy_script.sh index e312afff..94e2de5b 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -180,7 +180,7 @@ export -f prune update_apps(){ mapfile -t array < <(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,container_images_update_available,status' | grep ",true" | sort) - [[ -z $array ]] && echo -e "\nThere are no updates available" || echo -e "\n${#array[@]} update(s) available" + [[ -z $array ]] && echo -e "\nThere are no updates available" && return 0 || echo -e "\n${#array[@]} update(s) available" [[ -z $timeout ]] && echo -e "\nDefault Timeout: 500" && timeout=500 || echo -e "\nCustom Timeout: $timeout" for i in "${array[@]}" do