From a1154e9fabcca4feca629f86e86d139768f0de48 Mon Sep 17 00:00:00 2001 From: Markus Reiter <me@reitermark.us> Date: Fri, 16 Dec 2016 19:40:10 +0100 Subject: [PATCH] Deprecate `brew cask update`. --- Library/Homebrew/cask/lib/hbc/cli.rb | 2 +- Library/Homebrew/cask/lib/hbc/cli/update.rb | 20 -------------------- Library/Homebrew/compat/hbc/cli/update.rb | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 21 deletions(-) delete mode 100644 Library/Homebrew/cask/lib/hbc/cli/update.rb create mode 100644 Library/Homebrew/compat/hbc/cli/update.rb diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index c9625c7e20..f1057566ef 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -19,7 +19,7 @@ require "hbc/cli/reinstall" require "hbc/cli/search" require "hbc/cli/style" require "hbc/cli/uninstall" -require "hbc/cli/update" +require "compat/hbc/cli/update" require "hbc/cli/zap" require "hbc/cli/internal_use_base" diff --git a/Library/Homebrew/cask/lib/hbc/cli/update.rb b/Library/Homebrew/cask/lib/hbc/cli/update.rb deleted file mode 100644 index 86d02bb55b..0000000000 --- a/Library/Homebrew/cask/lib/hbc/cli/update.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Hbc - class CLI - class Update < Base - def self.run(*_ignored) - result = SystemCommand.run(HOMEBREW_BREW_FILE, - args: ["update"]) - # TODO: separating stderr/stdout is undesirable here. - # Hbc::SystemCommand should have an option for plain - # unbuffered output. - print result.stdout - $stderr.print result.stderr - exit result.exit_status - end - - def self.help - "a synonym for 'brew update'" - end - end - end -end diff --git a/Library/Homebrew/compat/hbc/cli/update.rb b/Library/Homebrew/compat/hbc/cli/update.rb new file mode 100644 index 0000000000..32186472bf --- /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 -- GitLab