fix: cleanup with no packages
This commit is contained in:
4
brew.py
4
brew.py
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user