aboutsummaryrefslogtreecommitdiffstats
path: root/Library/brew.rb
diff options
context:
space:
mode:
authorJack Nagel2014-05-02 12:59:38 -0500
committerJack Nagel2014-05-02 12:59:38 -0500
commit1c21941dd0506ed971aa92f3f43419a7f4bcfb10 (patch)
tree4ae5a1ed56748973a54721aee1bff4f41338aa0b /Library/brew.rb
parentadde053c96d03e01d8a479c700a9b8b6b42aafb8 (diff)
downloadhomebrew-1c21941dd0506ed971aa92f3f43419a7f4bcfb10.tar.bz2
Simplify HOMEBREW_LIBRARY_PATH usage
Diffstat (limited to 'Library/brew.rb')
-rwxr-xr-xLibrary/brew.rb6
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|