aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/postinstall.rb2
-rw-r--r--Library/Homebrew/cmd/test.rb2
-rw-r--r--Library/Homebrew/config.rb6
-rw-r--r--Library/Homebrew/formula_installer.rb2
-rw-r--r--Library/Homebrew/test/lib/config.rb2
5 files changed, 11 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb
index b92eb40df..900980355 100644
--- a/Library/Homebrew/cmd/postinstall.rb
+++ b/Library/Homebrew/cmd/postinstall.rb
@@ -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}
diff --git a/Library/Homebrew/cmd/test.rb b/Library/Homebrew/cmd/test.rb
index 17ad7c220..7430f6983 100644
--- a/Library/Homebrew/cmd/test.rb
+++ b/Library/Homebrew/cmd/test.rb
@@ -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}
diff --git a/Library/Homebrew/config.rb b/Library/Homebrew/config.rb
index 505c49c6e..294e32db2 100644
--- a/Library/Homebrew/config.rb
+++ b/Library/Homebrew/config.rb
@@ -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
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 6271c08c1..ee6627ba0 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -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}
diff --git a/Library/Homebrew/test/lib/config.rb b/Library/Homebrew/test/lib/config.rb
index 919dfeaaf..af42adb58 100644
--- a/Library/Homebrew/test/lib/config.rb
+++ b/Library/Homebrew/test/lib/config.rb
@@ -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"