diff options
| author | Jack Nagel | 2014-05-02 12:59:38 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-02 12:59:38 -0500 |
| commit | 5ff3f4b04dffa3ef2a03784c972eb82f53c17c4a (patch) | |
| tree | 264a62f844aa2b6d4aafc9c7bcd1788d9bf9bb40 /Library | |
| parent | a02ae0d40cadcaf5862d7fe447c56522e414aebc (diff) | |
| download | homebrew-5ff3f4b04dffa3ef2a03784c972eb82f53c17c4a.tar.bz2 | |
`require` accepts Pathnames
Diffstat (limited to 'Library')
| -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}" |
