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.
This commit is contained in:
parent
6b18d5572d
commit
86516e563f
@ -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
|
||||
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/ruby
|
||||
HOMEBREW_BREW_FILE = `which brew`.strip
|
||||
|
||||
require 'global'
|
||||
|
||||
def text_for_keg_only_formula f
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user