From 2cd8ed0d63f89a4009e9935065b104ccda896671 Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Sat, 28 Jan 2017 22:34:36 -0700 Subject: [PATCH] move __PYENV_LAUNCHER__ unset so it's only run once --- pipenv/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 5dd4dfbc..98b975d9 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -39,6 +39,9 @@ click_completion.init() # Disable warnings for Python 2.6. requests.packages.urllib3.disable_warnings(InsecureRequestWarning) +# Prevent invalid shebangs with Homebrew-installed Python: https://bugs.python.org/issue22490 +os.environ.pop('__PYVENV_LAUNCHER__', None) + project = Project() @@ -499,8 +502,6 @@ def do_init(dev=False, requirements=False, skip_virtualenv=False, allow_global=F def pip_install(package_name=None, r=None, allow_global=False): - # Prevent invalid shebangs with Homebrew-installed Python: https://bugs.python.org/issue22490 - os.environ.pop('__PYVENV_LAUNCHER__', None) if r: c = delegator.run('{0} install -r {1} --require-hashes -i {2}'.format(which_pip(allow_global=allow_global), r, project.source['url'])) else: