Fix regression that broke repo-add aborting on failures

In commit cb0f2bd038 the changes from
commit 81d233b793 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>
This commit is contained in:
Eli Schwartz 2018-05-09 00:18:39 -04:00 committed by Allan McRae
parent 1741bdaf81
commit 0d356c27c1

View file

@ -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