aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
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