From b946986ca94ad638e6da41483ecc0bb52c63b816 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Sun, 7 Apr 2024 17:00:06 +0200 Subject: [PATCH] giteapc: disallow install with no arguments and no -u (#7) Fixes: #7 --- giteapc/repo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/giteapc/repo.py b/giteapc/repo.py index 44ca935..d203150 100644 --- a/giteapc/repo.py +++ b/giteapc/repo.py @@ -329,7 +329,9 @@ def install(*args, use_https=False, use_ssh=False, update=False, yes=False, dry_run=False): # Update all repositories - if args == () and update == True: + if args == () and not update: + return fatal(f"repo install: need one argument (unless -u is given)") + if args == () and update: args = [ r.fullname for r in LocalRepo.all() ] # Fetch every repository and determine its dependencies to form a basic