Merge pull request #3243 from reitermarkus/PATH

Use `PATH` where possible.
This commit is contained in:
Markus Reiter 2017-09-30 10:20:04 +02:00 committed by GitHub
commit 700300a76b
2 changed files with 2 additions and 2 deletions

View File

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

View File

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