From a1154e9fabcca4feca629f86e86d139768f0de48 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 16 Dec 2016 19:40:10 +0100 Subject: Deprecate `brew cask update`. --- Library/Homebrew/compat/hbc/cli/update.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Library/Homebrew/compat/hbc/cli/update.rb (limited to 'Library/Homebrew/compat') diff --git a/Library/Homebrew/compat/hbc/cli/update.rb b/Library/Homebrew/compat/hbc/cli/update.rb new file mode 100644 index 000000000..32186472b --- /dev/null +++ b/Library/Homebrew/compat/hbc/cli/update.rb @@ -0,0 +1,17 @@ +module Hbc + class CLI + class Update < Base + def self.run(*_ignored) + odeprecated "`brew cask update`", "`brew update`", disable_on: Time.utc(2017, 7, 1) + result = SystemCommand.run(HOMEBREW_BREW_FILE, args: ["update"], + print_stderr: true, + print_stdout: true) + exit result.exit_status + end + + def self.help + "a synonym for 'brew update'" + end + end + end +end -- cgit v1.2.3 From b11f38659a9799b3670655677216e0176de3a765 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 17 Dec 2016 17:13:04 +0100 Subject: Add warning to `brew cask help`. --- Library/Homebrew/compat/hbc/cli/update.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/compat') diff --git a/Library/Homebrew/compat/hbc/cli/update.rb b/Library/Homebrew/compat/hbc/cli/update.rb index 32186472b..ab161ea65 100644 --- a/Library/Homebrew/compat/hbc/cli/update.rb +++ b/Library/Homebrew/compat/hbc/cli/update.rb @@ -10,7 +10,7 @@ module Hbc end def self.help - "a synonym for 'brew update'" + Formatter.warning("deprecated: use `brew update` instead") end end end -- cgit v1.2.3 From cea1d18f45608dda5d3185659b790df1c5d1b4e7 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 30 Dec 2016 16:13:09 +0100 Subject: Do not require `compat/hbc/cli/update` when `—no-compat` is specified. --- Library/Homebrew/compat/hbc.rb | 1 + Library/Homebrew/compat/hbc/cli/update.rb | 2 ++ 2 files changed, 3 insertions(+) (limited to 'Library/Homebrew/compat') diff --git a/Library/Homebrew/compat/hbc.rb b/Library/Homebrew/compat/hbc.rb index a1d1414a5..179639953 100644 --- a/Library/Homebrew/compat/hbc.rb +++ b/Library/Homebrew/compat/hbc.rb @@ -1 +1,2 @@ require "compat/hbc/cask_loader" +require "compat/hbc/cli/update" diff --git a/Library/Homebrew/compat/hbc/cli/update.rb b/Library/Homebrew/compat/hbc/cli/update.rb index ab161ea65..80f961228 100644 --- a/Library/Homebrew/compat/hbc/cli/update.rb +++ b/Library/Homebrew/compat/hbc/cli/update.rb @@ -1,3 +1,5 @@ +require "cask/lib/hbc/cli/base" + module Hbc class CLI class Update < Base -- cgit v1.2.3 From c31f959ec1955999d4be4446914eaab2e715058a Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 30 Dec 2016 16:46:27 +0100 Subject: Hide `update` from `brew cask help`. --- Library/Homebrew/compat/hbc/cli/update.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/compat') diff --git a/Library/Homebrew/compat/hbc/cli/update.rb b/Library/Homebrew/compat/hbc/cli/update.rb index 80f961228..7820997cb 100644 --- a/Library/Homebrew/compat/hbc/cli/update.rb +++ b/Library/Homebrew/compat/hbc/cli/update.rb @@ -11,8 +11,12 @@ module Hbc exit result.exit_status end + def self.visible + false + end + def self.help - Formatter.warning("deprecated: use `brew update` instead") + "a synonym for 'brew update'" end end end -- cgit v1.2.3