aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/diagnostic_spec.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-04-23 09:45:47 +0100
committerGitHub2017-04-23 09:45:47 +0100
commit11acadaa50c1b42f84e21ff42439a10aa9671cd6 (patch)
tree41c48c75fda40ceb9c3739bce42f568a38b3f6f7 /Library/Homebrew/test/diagnostic_spec.rb
parentcb17a80577bbf8812ca4ee6eef97039cd34ebe3e (diff)
parentd02b4f321d01fbd4cd2b4c1bd76d1f06d1612126 (diff)
downloadbrew-11acadaa50c1b42f84e21ff42439a10aa9671cd6.tar.bz2
Merge pull request #2524 from MikeMcQuaid/more-env-filtering-fixes
Hide sensitive tokens from install/test/post.
Diffstat (limited to 'Library/Homebrew/test/diagnostic_spec.rb')
-rw-r--r--Library/Homebrew/test/diagnostic_spec.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/test/diagnostic_spec.rb b/Library/Homebrew/test/diagnostic_spec.rb
index c2bcdb9c0..6e2c09268 100644
--- a/Library/Homebrew/test/diagnostic_spec.rb
+++ b/Library/Homebrew/test/diagnostic_spec.rb
@@ -122,8 +122,9 @@ describe Homebrew::Diagnostic::Checks do
specify "#check_user_path_3" do
begin
sbin = HOMEBREW_PREFIX/"sbin"
- ENV["PATH"] = "#{HOMEBREW_PREFIX}/bin#{File::PATH_SEPARATOR}" +
- ENV["PATH"].gsub(/(?:^|#{Regexp.escape(File::PATH_SEPARATOR)})#{Regexp.escape(sbin)}/, "")
+ ENV["HOMEBREW_PATH"] =
+ "#{HOMEBREW_PREFIX}/bin#{File::PATH_SEPARATOR}" +
+ ENV["HOMEBREW_PATH"].gsub(/(?:^|#{Regexp.escape(File::PATH_SEPARATOR)})#{Regexp.escape(sbin)}/, "")
(sbin/"something").mkpath
expect(subject.check_user_path_1).to be nil
@@ -149,7 +150,9 @@ describe Homebrew::Diagnostic::Checks do
file = "#{path}/foo-config"
FileUtils.touch file
FileUtils.chmod 0755, file
- ENV["PATH"] = "#{path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}"
+ ENV["HOMEBREW_PATH"] =
+ ENV["PATH"] =
+ "#{path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}"
expect(subject.check_for_config_scripts)
.to match('"config" scripts exist')