Skip to content
Snippets Groups Projects
Commit 86516e56 authored by Max Howell's avatar Max Howell
Browse files

Set ENV[HOMEBREW_BREW_FILE]

Thus install.rb gets the path to the instantiating brew process rather than whichever is first in the PATH. Not to mention Homebrew doesn't *have* to be in the PATH.
parent 6b18d557
No related branches found
Tags 1.1.5
No related merge requests found
......@@ -38,6 +38,10 @@ else
HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path
end
if not defined? HOMEBREW_BREW_FILE
HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] or `which brew`.chomp
end
HOMEBREW_PREFIX = Pathname.new(HOMEBREW_BREW_FILE).dirname.parent # Where we link under
HOMEBREW_REPOSITORY = Pathname.new(HOMEBREW_BREW_FILE).realpath.dirname.parent # Where .git is found
......
#!/usr/bin/ruby
HOMEBREW_BREW_FILE = `which brew`.strip
require 'global'
def text_for_keg_only_formula f
......
......@@ -6,6 +6,7 @@
Dir.getwd rescue abort "The current working directory doesn't exist, cannot proceed."
HOMEBREW_BREW_FILE = File.expand_path __FILE__
ENV['HOMEBREW_BREW_FILE'] = HOMEBREW_BREW_FILE
def homebrew_rubylib_path
lib_path = "/../../Library/Homebrew"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment