From 3a82f965b6c1cb51202cb73d003fa0fccc7bc9e6 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 24 Feb 2018 08:09:12 -0500 Subject: [PATCH] improvements to pipenv clean --- pipenv/core.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index e8561257..7d87bc2c 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -1629,6 +1629,8 @@ def ensure_lockfile(): ) do_lock(pre=pre) + else: + do_lock(pre=pre) def do_py(system=False): @@ -2302,11 +2304,7 @@ def do_clean( # Ensure that virtualenv is available. ensure_project(three=three, python=python, validate=False) - if not project.lockfile_exists: - click.echo( - '{0}: Could not find Pipfile.lock'.format(crayons.red('Warning')) - ) - sys.exit(1) + ensure_lockfile() installed_packages = delegator.run( '{0} freeze'.format(which('pip'))