From 9ebf3388040f696f61144c5baf50673fcadadff6 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 17 Nov 2017 17:41:58 +0000 Subject: diagnostic: fix paths usage. - Don't allow taking an argument. This doesn't work and never has as it caches the result regardless of the argument. - Don't rely on the PATH to check for external commands. --- Library/Homebrew/test/diagnostic_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/diagnostic_spec.rb b/Library/Homebrew/test/diagnostic_spec.rb index 8a25413ed..f347010a9 100644 --- a/Library/Homebrew/test/diagnostic_spec.rb +++ b/Library/Homebrew/test/diagnostic_spec.rb @@ -194,7 +194,7 @@ describe Homebrew::Diagnostic::Checks do FileUtils.chmod 0755, cmd end - ENV["PATH"] = [path1, path2, ENV["PATH"]].join File::PATH_SEPARATOR + allow(Tap).to receive(:cmd_directories).and_return([path1, path2]) expect(subject.check_for_external_cmd_name_conflict) .to match("brew-foo") -- cgit v1.2.3