From 3390014a9c55ffa400a0fa70cfe9b1104bc836dc Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Mon, 25 Oct 2021 01:47:35 +0200 Subject: [PATCH] packages.py: fix `package update` cmd with --non-interactive --- packages.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages.py b/packages.py index d514391..27d4f85 100644 --- a/packages.py +++ b/packages.py @@ -117,10 +117,11 @@ def clone_pkbuilds(pkgbuilds_dir: str, repo_url: str, branch: str, interactive=F if result.returncode != 0: raise Exception('failed switching branches') if interactive: - if click.confirm('Would you like to try updating the PKGBUILDs repo?'): - result = git(['pull'], pkgbuilds_dir) - if result.returncode != 0: - raise Exception('failed to update pkgbuilds') + if not click.confirm('Would you like to try updating the PKGBUILDs repo?'): + return + result = git(['pull'], pkgbuilds_dir) + if result.returncode != 0: + raise Exception('failed to update pkgbuilds') def init_pkgbuilds(interactive=False):