don't run this if --system is provided

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-17 17:27:59 -04:00
parent f512ff56f5
commit 477633811a
+8 -7
View File
@@ -1006,12 +1006,13 @@ def do_init(
):
"""Executes the init functionality."""
if not project.virtualenv_exists:
try:
do_create_virtualenv()
except KeyboardInterrupt:
cleanup_virtualenv(bare=False)
sys.exit(1)
if not system:
if not project.virtualenv_exists:
try:
do_create_virtualenv()
except KeyboardInterrupt:
cleanup_virtualenv(bare=False)
sys.exit(1)
# Ensure the Pipfile exists.
ensure_pipfile()
@@ -1388,7 +1389,7 @@ def install(
if package_name is False:
click.echo(crayons.white('No package provided, installing all dependencies.', bold=True), err=True)
do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, skip_lock=skip_lock, verbose=verbose)
do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose)
sys.exit(0)
for package_name in package_names: