aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/formula.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index d0d1e269b..d055ad504 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1273,7 +1273,7 @@ class Formula
mktemp do
@testpath = Pathname.pwd
ENV["HOME"] = @testpath
- setup_test_home @testpath
+ setup_home @testpath
test
end
ensure
@@ -1309,8 +1309,8 @@ class Formula
protected
- def setup_test_home(home)
- # keep Homebrew's site-packages in sys.path when testing with system Python
+ def setup_home(home)
+ # keep Homebrew's site-packages in sys.path when using system Python
user_site_packages = home/"Library/Python/2.7/lib/python/site-packages"
user_site_packages.mkpath
(user_site_packages/"homebrew.pth").write <<-EOS.undent
@@ -1470,6 +1470,7 @@ class Formula
mkdir_p env_home
old_home, ENV["HOME"] = ENV["HOME"], env_home
+ setup_home env_home
begin
yield