diff --git a/Library/Homebrew/python_helper.rb b/Library/Homebrew/python_helper.rb index d91bd7d2ff..a8389cee7e 100644 --- a/Library/Homebrew/python_helper.rb +++ b/Library/Homebrew/python_helper.rb @@ -56,8 +56,8 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block) puts "brew: Python block (#{py.binary})..." if ARGV.verbose? && ARGV.debug? # Ensure env changes are only temporary: + old_env = ENV.to_hash begin - old_env = ENV.to_hash # In order to install into the `Cellar`, the dir must exist and be in the # `PYTHONPATH`. This will be executed in the context of the formula and # lib points to the `HOMEBREW_PREFIX/Cellar///lib`.