aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-03-07 00:29:04 +0100
committerGitHub2017-03-07 00:29:04 +0100
commit067c71363d3391a2ed60ef481b2ed958190699bc (patch)
treea6a1ecf359e20e3cb0e573279b792476a583c864
parent1959cc3f2df6287467d90242fc6dee41398a5731 (diff)
parentb032963d09df9b5dc021d4627ec668a46ce419c2 (diff)
downloadbrew-067c71363d3391a2ed60ef481b2ed958190699bc.tar.bz2
Merge pull request #2277 from reitermarkus/require
Use Homebrew’s `require?`.
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb11
1 files changed, 0 insertions, 11 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index 8e178e373..afc928bb1 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -91,17 +91,6 @@ module Hbc
@lookup.fetch(command_string, command_string)
end
- # modified from Homebrew
- def self.require?(path)
- require path
- true # OK if already loaded
- rescue LoadError => e
- # HACK: :( because we should raise on syntax errors
- # but not if the file doesn't exist.
- # TODO: make robust!
- raise unless e.to_s.include? path
- end
-
def self.should_init?(command)
(command.is_a? Class) && (command < CLI::Base) && command.needs_init?
end