From b73725fa0ab4e48a0e25efa68a9dccde5bebde06 Mon Sep 17 00:00:00 2001 From: Castulo Martinez Date: Thu, 13 Feb 2020 09:13:38 -0800 Subject: [PATCH] Fixing a bug removing a 3rd-party repo that fails When removing a 3rd-party repository, if there is an error while setting up the global variables of the repository, the error code is lost and swupd reports as if the removal was successful even when it failed. This commit fixes that issue. Signed-off-by: Castulo Martinez --- src/3rd_party_remove.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rd_party_remove.c b/src/3rd_party_remove.c index 538e69da..b6cc85f0 100644 --- a/src/3rd_party_remove.c +++ b/src/3rd_party_remove.c @@ -120,7 +120,8 @@ enum swupd_code third_party_remove_main(int argc, char **argv) } /* set the appropriate content_dir and state_dir for the selected 3rd-party repo */ - if (third_party_set_repo(repo, globals.sigcheck)) { + ret = third_party_set_repo(repo, globals.sigcheck); + if (ret) { goto exit; }