diff options
| author | Mike McQuaid | 2017-11-17 17:41:58 +0000 | 
|---|---|---|
| committer | Mike McQuaid | 2017-11-17 17:41:58 +0000 | 
| commit | 9ebf3388040f696f61144c5baf50673fcadadff6 (patch) | |
| tree | c3ce8fac38dd2bd7f2fa89887caddce61f81c409 /Library/Homebrew/utils.rb | |
| parent | 2225febfb396f7db3ccf0c68feae6143128d9935 (diff) | |
| download | brew-9ebf3388040f696f61144c5baf50673fcadadff6.tar.bz2 | |
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.
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 1d16044da..48ab94c4f 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -420,8 +420,8 @@ def nostdout    end  end -def paths(env_path = ENV["PATH"]) -  @paths ||= PATH.new(env_path).collect do |p| +def paths +  @paths ||= PATH.new(ENV["HOMEBREW_PATH"]).collect do |p|      begin        File.expand_path(p).chomp("/")      rescue ArgumentError | 
