Skip to content
Snippets Groups Projects
Unverified Commit ac629549 authored by Maxim Belkin's avatar Maxim Belkin
Browse files

cmd/cleanup.rb: fix input handling

parent 3eba477b
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,10 @@ module Homebrew
def cleanup
args = cleanup_args.parse
if args.prune.present? && !Integer(args.prune, exception: false) && args.prune != "all"
raise UsageError, "--prune= expects an integer or 'all'."
end
cleanup = Cleanup.new(*args.named, dry_run: args.dry_run?, scrub: args.s?, days: args.prune&.to_i)
if args.prune_prefix?
cleanup.prune_prefix_symlinks_and_directories
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment