From df34b90fc4ace42cc3531dd9f709c678d16ce371 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 11 Mar 2019 00:34:16 -0400 Subject: [PATCH] Port #3263 with updates - Allow click's editor to inherit the environment from the subprocess. - Fixes #2747 - Supersedes, replaces, and closes #3263 Signed-off-by: Dan Ryan --- pipenv/cli/command.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pipenv/cli/command.py b/pipenv/cli/command.py index 32f30b88..33388cc4 100644 --- a/pipenv/cli/command.py +++ b/pipenv/cli/command.py @@ -553,7 +553,7 @@ def run_open(state, module, *args, **kwargs): EDITOR=atom pipenv open requests """ - from ..core import which, ensure_project + from ..core import which, ensure_project, inline_activate_virtual_environment # Ensure that virtualenv is available. ensure_project( @@ -573,9 +573,7 @@ def run_open(state, module, *args, **kwargs): else: p = c.out.strip().rstrip("cdo") echo(crayons.normal("Opening {0!r} in your EDITOR.".format(p), bold=True)) - from ..core import inline_activate_virtual_environment inline_activate_virtual_environment() - environment={"VIRTUAL_ENV":os.environ["VIRTUAL_ENV"]} edit(filename=p) return 0