diff options
| author | Mike McQuaid | 2017-05-14 15:08:16 +0100 |
|---|---|---|
| committer | GitHub | 2017-05-14 15:08:16 +0100 |
| commit | e8ef21252d873b5bbef6369be1be4d939fab8b0f (patch) | |
| tree | c53b98cbe44e73eb112557b466735e8e2f837068 | |
| parent | 25e9e658afad0c56c1b7be935a964b915dd72f0b (diff) | |
| parent | 7055abc43670b48b874a0088990b068f2fa34c9f (diff) | |
| download | brew-e8ef21252d873b5bbef6369be1be4d939fab8b0f.tar.bz2 | |
Merge pull request #2617 from MikeMcQuaid/interactive-home-access
Allow --interactive to access HOME
| -rw-r--r-- | Library/Homebrew/formula.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/sandbox.rb | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 17a34dd13..1b3b718da 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1943,8 +1943,10 @@ class Formula old_curl_home = ENV["CURL_HOME"] old_path = ENV["HOMEBREW_PATH"] - ENV["HOME"] = env_home - ENV["CURL_HOME"] = old_curl_home || old_home + unless ARGV.interactive? + ENV["HOME"] = env_home + ENV["CURL_HOME"] = old_curl_home || old_home + end ENV["HOMEBREW_PATH"] = nil setup_home env_home @@ -1955,8 +1957,10 @@ class Formula yield staging ensure @buildpath = nil - ENV["HOME"] = old_home - ENV["CURL_HOME"] = old_curl_home + unless ARGV.interactive? + ENV["HOME"] = old_home + ENV["CURL_HOME"] = old_curl_home + end ENV["HOMEBREW_PATH"] = old_path end end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index ad87c2a5f..f50d9ed9e 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -664,6 +664,7 @@ class FormulaInstaller sandbox = Sandbox.new formula.logs.mkpath sandbox.record_log(formula.logs/"build.sandbox.log") + sandbox.allow_write_path(ENV["HOME"]) if ARGV.interactive? sandbox.allow_write_temp_and_cache sandbox.allow_write_log(formula) sandbox.allow_write_xcode diff --git a/Library/Homebrew/sandbox.rb b/Library/Homebrew/sandbox.rb index 9597dafa8..b16bbde1a 100644 --- a/Library/Homebrew/sandbox.rb +++ b/Library/Homebrew/sandbox.rb @@ -5,10 +5,6 @@ class Sandbox SANDBOX_EXEC = "/usr/bin/sandbox-exec".freeze SANDBOXED_TAPS = %w[ homebrew/core - homebrew/dupes - homebrew/fuse - homebrew/devel-only - homebrew/tex ].freeze def self.available? |
