diff options
| author | Jack Nagel | 2014-05-02 12:59:38 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-02 12:59:38 -0500 |
| commit | 6577f93f714a347f705ce62fd23927a59cbedca4 (patch) | |
| tree | c28c4a61e94edac5258cc67868b98a82866c37a5 /Library/brew.rb | |
| parent | 2b46af5136675de632c8791f675e85532b3c3eee (diff) | |
| download | brew-6577f93f714a347f705ce62fd23927a59cbedca4.tar.bz2 | |
Simplify HOMEBREW_LIBRARY_PATH usage
Diffstat (limited to 'Library/brew.rb')
| -rwxr-xr-x | Library/brew.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/brew.rb b/Library/brew.rb index 12ef02608..280333943 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -11,8 +11,8 @@ if ARGV == %w{--prefix} end require 'pathname' -HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.dirname.parent.join("Library/Homebrew").to_s -$:.unshift(HOMEBREW_LIBRARY_PATH) +HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.dirname.parent.join("Library", "Homebrew") +$:.unshift(HOMEBREW_LIBRARY_PATH.to_s) require 'global' if ARGV.help? @@ -101,7 +101,7 @@ begin # Add contributed commands to PATH before checking. ENV['PATH'] += "#{File::PATH_SEPARATOR}#{HOMEBREW_CONTRIB}/cmd" - if require? HOMEBREW_REPOSITORY/"Library/Homebrew/cmd"/cmd + if require? HOMEBREW_LIBRARY_PATH.join("cmd", cmd) Homebrew.send cmd.to_s.gsub('-', '_').downcase elsif which "brew-#{cmd}" %w[CACHE CELLAR LIBRARY_PATH PREFIX REPOSITORY].each do |e| |
