Let the test environment inject its own load path
This commit is contained in:
parent
80403db9a1
commit
2ca8172fe9
@ -9,7 +9,7 @@ module Homebrew
|
||||
args = %W[
|
||||
nice #{RUBY_PATH}
|
||||
-W0
|
||||
-I #{HOMEBREW_LIBRARY_PATH}
|
||||
-I #{HOMEBREW_LOAD_PATH}
|
||||
--
|
||||
#{HOMEBREW_LIBRARY_PATH}/postinstall.rb
|
||||
#{formula.path}
|
||||
|
||||
@ -29,7 +29,7 @@ module Homebrew
|
||||
args = %W[
|
||||
#{RUBY_PATH}
|
||||
-W0
|
||||
-I #{HOMEBREW_LIBRARY_PATH}
|
||||
-I #{HOMEBREW_LOAD_PATH}
|
||||
--
|
||||
#{HOMEBREW_LIBRARY_PATH}/test.rb
|
||||
#{f.path}
|
||||
|
||||
@ -50,3 +50,9 @@ end
|
||||
HOMEBREW_LOGS = Pathname.new(ENV['HOMEBREW_LOGS'] || '~/Library/Logs/Homebrew/').expand_path
|
||||
|
||||
HOMEBREW_TEMP = Pathname.new(ENV.fetch('HOMEBREW_TEMP', '/tmp'))
|
||||
|
||||
if not defined? HOMEBREW_LIBRARY_PATH
|
||||
HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent.join("Homebrew")
|
||||
end
|
||||
|
||||
HOMEBREW_LOAD_PATH = HOMEBREW_LIBRARY_PATH
|
||||
|
||||
@ -472,7 +472,7 @@ class FormulaInstaller
|
||||
args = %W[
|
||||
nice #{RUBY_PATH}
|
||||
-W0
|
||||
-I #{HOMEBREW_LIBRARY_PATH}
|
||||
-I #{HOMEBREW_LOAD_PATH}
|
||||
--
|
||||
#{HOMEBREW_LIBRARY_PATH}/build.rb
|
||||
#{formula.path}
|
||||
|
||||
@ -11,6 +11,8 @@ TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") { |k|
|
||||
HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix")
|
||||
HOMEBREW_REPOSITORY = HOMEBREW_PREFIX
|
||||
HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY+"Library"
|
||||
HOMEBREW_LIBRARY_PATH = File.expand_path("../../..", __FILE__)
|
||||
HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":")
|
||||
HOMEBREW_CACHE = HOMEBREW_PREFIX.parent+"cache"
|
||||
HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache"
|
||||
HOMEBREW_CELLAR = HOMEBREW_PREFIX.parent+"cellar"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user