Skip to content

Commit

Permalink
Merge pull request #8390 from MLH-Fellowship/deprecate-cask
Browse files Browse the repository at this point in the history
cask: Add TODOs to deprecate integrated cask commands
  • Loading branch information
MikeMcQuaid authored Aug 19, 2020
2 parents 9a63811 + e088918 commit b26e04a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
15 changes: 15 additions & 0 deletions Library/Homebrew/cask/cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ class Cmd
"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

Expand Down Expand Up @@ -212,6 +222,11 @@ def run
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
Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/cask/cmd/--cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ def self.command_name
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
Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/cask/cmd/home.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ def self.description
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/"
Expand Down

0 comments on commit b26e04a

Please sign in to comment.