diff options
| author | Markus Reiter | 2017-03-06 17:14:25 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-03-06 17:14:25 +0100 |
| commit | b032963d09df9b5dc021d4627ec668a46ce419c2 (patch) | |
| tree | 70712cc1b585191e704da7ec71630427dc0f2bf5 | |
| parent | d37f2e7ae7b6915063960998df16b3cf4f76115c (diff) | |
| download | brew-b032963d09df9b5dc021d4627ec668a46ce419c2.tar.bz2 | |
Use Homebrew’s `require?`.
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli.rb | 11 |
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 |
