Use PATH
where possible.
This commit is contained in:
parent
ffb582b5a6
commit
7cadff0a33
@ -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..."
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user