From 0d356c27c17fb62ed31327d634748f64c781dc49 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 9 May 2018 00:18:39 -0400 Subject: Fix regression that broke repo-add aborting on failures In commit cb0f2bd0385f447e045e2b2aab9ffa55df3c2d8a the changes from commit 81d233b79345d05d5bf17a4b2844085e14f9ee36 seem to have been inadvertently backed out. Right now the current check doesn't do anything, since "fail" is always nothing and therefore successful. Fixes FS#58505 Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/repo-add.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 4b3a03ea..8e577a1e 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -811,11 +811,12 @@ fi prepare_repo_db +fail=0 for arg in "${args[@]:1}"; do case $cmd in repo-add) add "$arg" ;; repo-remove) remove "$arg" ;; - esac && success=1 + esac || fail=1 done # if the whole operation was a success, re-zip and rotate databases -- cgit v1.2.3-24-g4f1b