aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli.rb
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-18 17:22:08 +0200
committerMarkus Reiter2016-10-18 17:22:08 +0200
commit6e1c132f99166c716c991d687e4017167c2a37d0 (patch)
tree001a7e56e82c0afd3fee053be09782774b48ebbf /Library/Homebrew/cask/lib/hbc/cli.rb
parent8d83516577b04f8d635e2dee1f95308bad527676 (diff)
downloadbrew-6e1c132f99166c716c991d687e4017167c2a37d0.tar.bz2
Remove Cask’s `which` method.
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli.rb')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index ad8c02aab..11f8cc716 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -107,7 +107,7 @@ module Hbc
if command.respond_to?(:run)
# usual case: built-in command verb
command.run(*rest)
- elsif require? Utils.which("brewcask-#{command}.rb").to_s
+ elsif require? which("brewcask-#{command}.rb").to_s
# external command as Ruby library on PATH, Homebrew-style
elsif command.to_s.include?("/") && require?(command.to_s)
# external command as Ruby library with literal path, useful
@@ -124,7 +124,7 @@ module Hbc
# other Ruby libraries must do everything via "require"
klass.run(*rest)
end
- elsif Utils.which "brewcask-#{command}"
+ elsif which("brewcask-#{command}")
# arbitrary external executable on PATH, Homebrew-style
exec "brewcask-#{command}", *ARGV[1..-1]
elsif Pathname.new(command.to_s).executable? &&