run_as_not_developer: use with_env helper
This commit is contained in:
parent
890788af65
commit
610af15f0e
@ -287,10 +287,9 @@ ensure
|
||||
end
|
||||
|
||||
def run_as_not_developer(&_block)
|
||||
old = ENV.delete "HOMEBREW_DEVELOPER"
|
||||
with_env "HOMEBREW_DEVELOPER" => nil do
|
||||
yield
|
||||
ensure
|
||||
ENV["HOMEBREW_DEVELOPER"] = old
|
||||
end
|
||||
end
|
||||
|
||||
# Kernel.system but with exceptions
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user