mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
don't run this if --system is provided
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
+8
-7
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user