Use PATH where possible.

This commit is contained in:
Markus Reiter 2017-09-29 22:10:44 +02:00
parent ffb582b5a6
commit 7cadff0a33
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ module Homebrew
safe_system "git", "reset", "--hard", start_commit safe_system "git", "reset", "--hard", start_commit
# update ENV["PATH"] # update ENV["PATH"]
ENV["PATH"] = "#{curdir}/bin:#{ENV["PATH"]}" ENV["PATH"] = PATH.new(ENV["PATH"]).prepend(curdir/"bin")
# run brew update # run brew update
oh1 "Running brew update..." oh1 "Running brew update..."

View File

@ -264,7 +264,7 @@ end
def with_system_path def with_system_path
old_path = ENV["PATH"] old_path = ENV["PATH"]
ENV["PATH"] = "/usr/bin:/bin" ENV["PATH"] = PATH.new("/usr/bin", "/bin")
yield yield
ensure ensure
ENV["PATH"] = old_path ENV["PATH"] = old_path