From 5ad2a947bb8347126226b64a17ddac5ece0fc921 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Sat, 20 Jan 2018 22:39:15 +0100 Subject: [PATCH] Cosmetic fix - showing error even it wasn't there when creating repository. --- lib/general.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/general.sh b/lib/general.sh index ada469297e9e..a7fc07f80444 100644 --- a/lib/general.sh +++ b/lib/general.sh @@ -476,9 +476,11 @@ addtorepo() (aptly repo list -config=../config/aptly.conf) | egrep packages # remove debs if no errors found - if [[ $errors -eq 0 && "$2" == "delete" ]]; then - display_alert "Purging incoming debs" "all" "ext" - find ${POT} -name "*.deb" -type f -delete + if [[ $errors -eq 0 ]]; then + if [[ "$2" == "delete" ]]; then + display_alert "Purging incoming debs" "all" "ext" + find ${POT} -name "*.deb" -type f -delete + fi else display_alert "There were some problems $err_txt" "leaving incoming directory intact" "err" fi