diff --git a/pipenv/cli.py b/pipenv/cli.py index 5a774c36..367ddfef 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -600,6 +600,8 @@ def shell(three=None): # Interact with the new shell. c.interact() + c.close() + sys.exit(c.exitstatus) @click.command(help="Spawns a command installed into the virtualenv.", context_settings=dict( @@ -622,6 +624,8 @@ def run(command, args, three=None): # Interact with the new shell. c.interact() + c.close() + sys.exit(c.exitstatus) @click.command(help="Checks PEP 508 markers provided in Pipfile.")