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
|
HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path
|
||||||
end
|
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_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
|
HOMEBREW_REPOSITORY = Pathname.new(HOMEBREW_BREW_FILE).realpath.dirname.parent # Where .git is found
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
#!/usr/bin/ruby
|
#!/usr/bin/ruby
|
||||||
HOMEBREW_BREW_FILE = `which brew`.strip
|
|
||||||
|
|
||||||
require 'global'
|
require 'global'
|
||||||
|
|
||||||
def text_for_keg_only_formula f
|
def text_for_keg_only_formula f
|
||||||
|
|||||||
1
bin/brew
1
bin/brew
@ -6,6 +6,7 @@
|
|||||||
Dir.getwd rescue abort "The current working directory doesn't exist, cannot proceed."
|
Dir.getwd rescue abort "The current working directory doesn't exist, cannot proceed."
|
||||||
|
|
||||||
HOMEBREW_BREW_FILE = File.expand_path __FILE__
|
HOMEBREW_BREW_FILE = File.expand_path __FILE__
|
||||||
|
ENV['HOMEBREW_BREW_FILE'] = HOMEBREW_BREW_FILE
|
||||||
|
|
||||||
def homebrew_rubylib_path
|
def homebrew_rubylib_path
|
||||||
lib_path = "/../../Library/Homebrew"
|
lib_path = "/../../Library/Homebrew"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user