diff options
| author | Mike McQuaid | 2017-05-09 20:00:11 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-05-09 20:00:11 +0100 |
| commit | 7055abc43670b48b874a0088990b068f2fa34c9f (patch) | |
| tree | 4401e8bbab0a5ee793625f857662401df134b31a | |
| parent | f1d4c4be78905be0d5fd83922ff1262ed92ba4e8 (diff) | |
| download | brew-7055abc43670b48b874a0088990b068f2fa34c9f.tar.bz2 | |
Allow --interactive to access HOME
This may result in a slightly varied build but it’s generally just far
less annoying to be able to access all your e.g. shell configuration.
| -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? |
