summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2018-05-09 00:18:39 -0400
committerAllan McRae <allan@archlinux.org>2018-05-12 21:34:54 +1000
commit0d356c27c17fb62ed31327d634748f64c781dc49 (patch)
tree70e6d67416496f51d0db287aa61eab03132e0b97
parent1741bdaf81cc7c0881ee7a26861b3d94c384f13f (diff)
downloadpacman-0d356c27c17fb62ed31327d634748f64c781dc49.tar.gz
pacman-0d356c27c17fb62ed31327d634748f64c781dc49.zip
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 <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/repo-add.sh.in3
1 files changed, 2 insertions, 1 deletions
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