From e8a8ac428f44fd404dd4dd85a7b4b678a8893aed Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 30 Apr 2018 00:03:48 -0400 Subject: [PATCH] Make sure we are not in a virtualenv if aborting - Fixes #2078 Signed-off-by: Dan Ryan --- pipenv/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/core.py b/pipenv/core.py index a759c857..0254eb8d 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -1352,7 +1352,7 @@ def do_init( do_lock(system=system, pre=pre, keep_outdated=keep_outdated) # Write out the lockfile if it doesn't exist. if not project.lockfile_exists and not skip_lock: - if system or allow_global: + if system or allow_global and not PIPENV_VIRTUALENV: click.echo( '{0}: --system is intended to be used for Pipfile installation, ' 'not installation of specific packages. Aborting.'.format(