giteapc: disallow install with no arguments and no -u (#7)

Fixes: #7
This commit is contained in:
Lephenixnoir 2024-04-07 17:00:06 +02:00
parent 5f2757e11b
commit b946986ca9
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 3 additions and 1 deletions

View File

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