aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/compat')
-rw-r--r--Library/Homebrew/compat/hbc.rb1
-rw-r--r--Library/Homebrew/compat/hbc/cli.rb19
-rw-r--r--Library/Homebrew/compat/hbc/cli/update.rb4
-rw-r--r--Library/Homebrew/compat/utils.rb2
4 files changed, 23 insertions, 3 deletions
diff --git a/Library/Homebrew/compat/hbc.rb b/Library/Homebrew/compat/hbc.rb
index 353a72488..3ff8fccb7 100644
--- a/Library/Homebrew/compat/hbc.rb
+++ b/Library/Homebrew/compat/hbc.rb
@@ -2,6 +2,7 @@ require "compat/hbc/cask_loader"
require "compat/hbc/cli/update"
require "compat/hbc/cache"
require "compat/hbc/caskroom"
+require "compat/hbc/cli"
module Hbc
class << self
diff --git a/Library/Homebrew/compat/hbc/cli.rb b/Library/Homebrew/compat/hbc/cli.rb
new file mode 100644
index 000000000..0173bce9c
--- /dev/null
+++ b/Library/Homebrew/compat/hbc/cli.rb
@@ -0,0 +1,19 @@
+require "cask/lib/hbc/cli/options"
+
+module Hbc
+ class CLI
+ include Options
+
+ option "--binarydir=PATH", (lambda do |*|
+ opoo <<-EOS.undent
+ Option --binarydir is obsolete!
+ Homebrew-Cask now uses the same location as your Homebrew installation for executable links.
+ EOS
+ end)
+
+ option "--caskroom=PATH", (lambda do |value|
+ Hbc.caskroom = value
+ odeprecated "`brew cask` with the `--caskroom` flag", disable_on: Time.utc(2017, 10, 31)
+ end)
+ end
+end
diff --git a/Library/Homebrew/compat/hbc/cli/update.rb b/Library/Homebrew/compat/hbc/cli/update.rb
index 7820997cb..95321e898 100644
--- a/Library/Homebrew/compat/hbc/cli/update.rb
+++ b/Library/Homebrew/compat/hbc/cli/update.rb
@@ -1,8 +1,8 @@
-require "cask/lib/hbc/cli/base"
+require "cask/lib/hbc/cli/abstract_command"
module Hbc
class CLI
- class Update < Base
+ class Update < AbstractCommand
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"],
diff --git a/Library/Homebrew/compat/utils.rb b/Library/Homebrew/compat/utils.rb
index 3842e8a83..f2cca4726 100644
--- a/Library/Homebrew/compat/utils.rb
+++ b/Library/Homebrew/compat/utils.rb
@@ -19,5 +19,5 @@ end
def plural(n, s = "s")
odeprecated "#plural", "Formatter.pluralize"
- n == 1 ? "" : s
+ (n == 1) ? "" : s
end