Skip to content
Snippets Groups Projects
Unverified Commit b26e04ad authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #8390 from MLH-Fellowship/deprecate-cask

cask: Add TODOs to deprecate integrated cask commands
parents 9a63811e e0889181
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,16 @@ module Cask
"dr" => "doctor",
}.freeze
DEPRECATED_COMMANDS = {
Cmd::Cache => "brew --cache --cask",
Cmd::Doctor => "brew doctor --verbose",
Cmd::Home => "brew home",
Cmd::List => "brew list --cask",
Cmd::Outdated => "brew outdated --cask",
Cmd::Reinstall => "brew reinstall",
Cmd::Upgrade => "brew upgrade --cask",
}.freeze
def self.description
max_command_len = Cmd.commands.map(&:length).max
......@@ -212,6 +222,11 @@ module Cask
detect_external_command(*argv) ||
[args.remaining.empty? ? NullCommand : UnknownSubcommand.new(args.remaining.first), argv]
# TODO: enable for next major/minor release
# if (replacement = DEPRECATED_COMMANDS[command])
# odeprecated "brew cask #{command.command_name}", replacement
# end
if args.help?
puts command.help
else
......
......@@ -18,9 +18,6 @@ module Cask
end
def run
# TODO: enable for next major/minor release
# odeprecated "brew cask --cache", "brew --cache --cask"
casks.each do |cask|
puts self.class.cached_location(cask)
end
......
......@@ -8,9 +8,6 @@ module Cask
end
def run
# TODO: enable for next major/minor release
# odeprecated "brew cask home", "brew home"
if casks.none?
odebug "Opening project homepage"
self.class.open_url "https://brew.sh/"
......
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