diff options
| author | Jack Nagel | 2014-05-02 12:59:38 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-02 12:59:38 -0500 |
| commit | f6d81cf7628442808b4ecd77fa5d267433bf224d (patch) | |
| tree | 229a9fd68a84bb39db574661717187d178a4c705 /Library/brew.rb | |
| parent | 1ff182ae68eeeba5462532b997af30030e09afe0 (diff) | |
| download | brew-f6d81cf7628442808b4ecd77fa5d267433bf224d.tar.bz2 | |
`require` accepts Pathnames
Diffstat (limited to 'Library/brew.rb')
| -rwxr-xr-x | Library/brew.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/brew.rb b/Library/brew.rb index d482fd1a3..60967748c 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -62,7 +62,7 @@ Dir.getwd rescue abort "The current working directory doesn't exist, cannot proc def require? path - require path.to_s.chomp + require path rescue LoadError => e # HACK :( because we should raise on syntax errors but # not if the file doesn't exist. TODO make robust! @@ -109,7 +109,7 @@ begin ENV["HOMEBREW_#{e}"] = Object.const_get("HOMEBREW_#{e}").to_s end exec "brew-#{cmd}", *ARGV - elsif require? which("brew-#{cmd}.rb").to_s + elsif require? which("brew-#{cmd}.rb") exit Homebrew.failed? ? 1 : 0 else onoe "Unknown command: #{cmd}" |
