32 lines
677 B
Ruby
Raw Normal View History

2016-04-08 16:28:43 +02:00
#: * `prune` [`--dry-run`]:
#: Deprecated. Use `brew cleanup` instead.
2016-04-08 16:28:43 +02:00
require "keg"
2018-11-05 17:07:33 +05:30
require "cli_parser"
require "cleanup"
module Homebrew
2016-09-26 01:44:51 +02:00
module_function
2018-11-05 17:07:33 +05:30
def prune_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`prune` [<options>]
Deprecated. Use `brew cleanup` instead.
2018-11-05 17:07:33 +05:30
EOS
switch "-n", "--dry-run",
description: "Show what would be removed, but do not actually remove anything."
switch :verbose
switch :debug
end
end
def prune
2018-11-05 17:07:33 +05:30
prune_args.parse
odeprecated("'brew prune'", "'brew cleanup'")
Cleanup.new(dry_run: args.dry_run?).prune_prefix_symlinks_and_directories
end
end