aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/support
diff options
context:
space:
mode:
authorMike McQuaid2017-04-22 16:31:19 +0100
committerMike McQuaid2017-04-22 16:31:19 +0100
commitd02b4f321d01fbd4cd2b4c1bd76d1f06d1612126 (patch)
treec7c3945f258f8b33278b120f788b8c6c82a21688 /Library/Homebrew/test/support
parent206d6de845c9041bbbd4d955e56befb338295e96 (diff)
downloadbrew-d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.tar.bz2
Hide sensitive tokens from install/test/post.
Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s PATH for e.g. `brew doctor` etc.
Diffstat (limited to 'Library/Homebrew/test/support')
-rw-r--r--Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
index b037068d2..ae1854f58 100644
--- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
+++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
@@ -72,6 +72,7 @@ RSpec.shared_context "integration test" do
env.merge!(
"PATH" => path,
+ "HOMEBREW_PATH" => path,
"HOMEBREW_BREW_FILE" => HOMEBREW_PREFIX/"bin/brew",
"HOMEBREW_INTEGRATION_TEST" => command_id_from_args(args),
"HOMEBREW_TEST_TMPDIR" => TEST_TMPDIR,