aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMisty De Meo2017-07-13 17:26:13 -0700
committerMisty De Meo2017-07-15 17:40:35 -0700
commit610af15f0ee5baae7a037f3c1e7a335fa0065fff (patch)
treec0c9c43065e989d8ed554057269ac819e5681d72 /Library/Homebrew/utils.rb
parent890788af65f4b9c42b4eb7246771d96512f48260 (diff)
downloadbrew-610af15f0ee5baae7a037f3c1e7a335fa0065fff.tar.bz2
run_as_not_developer: use with_env helper
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index e888404f7..5a6295394 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -287,10 +287,9 @@ ensure
end
def run_as_not_developer(&_block)
- old = ENV.delete "HOMEBREW_DEVELOPER"
- yield
-ensure
- ENV["HOMEBREW_DEVELOPER"] = old
+ with_env "HOMEBREW_DEVELOPER" => nil do
+ yield
+ end
end
# Kernel.system but with exceptions