From b123fca2270c4cd15167e70304004d14f9cc1983 Mon Sep 17 00:00:00 2001 From: William Ma Date: Tue, 18 Aug 2020 12:26:19 -0400 Subject: [PATCH] cask: Add TODOs to deprecate integrated cask cmds --- Library/Homebrew/cask/cmd.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Library/Homebrew/cask/cmd.rb b/Library/Homebrew/cask/cmd.rb index 1ce1cb3f2b..9de9fd7c9f 100644 --- a/Library/Homebrew/cask/cmd.rb +++ b/Library/Homebrew/cask/cmd.rb @@ -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