fix: cleanup with no packages

This commit is contained in:
relikd
2025-09-03 14:26:11 +02:00
parent 916d570ff4
commit 92ddff7f61

View File

@@ -529,12 +529,12 @@ def cli_cleanup(args: ArgParams) -> None:
''' '''
total_savings = 0 total_savings = 0
packages = Cellar.infoAll(args.packages, assertInstalled=True) packages = Cellar.infoAll(args.packages, assertInstalled=True)
if not packages: if args.packages and not packages:
Log.error('no package found') Log.error('no package found')
return return
if not args.packages: if not args.packages:
Log.info('==> Removing cached downloads') Log.info('==> Removing cached files')
total_savings += Cellar.cleanup(args.prune, dryRun=args.dry) total_savings += Cellar.cleanup(args.prune, dryRun=args.dry)
# remove all non-active versions # remove all non-active versions