mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
show warning if lockfile doesn't exist on clean
This commit is contained in:
+7
-1
@@ -2302,6 +2302,12 @@ 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)
|
||||
|
||||
installed_packages = delegator.run(
|
||||
'{0} freeze'.format(which('pip'))
|
||||
).out.strip().split('\n')
|
||||
@@ -2344,4 +2350,4 @@ def do_clean(
|
||||
# Uninstall the package.
|
||||
delegator.run('{0} uninstall {1} -y'.format(which('pip'), apparent_bad_package))
|
||||
|
||||
sys.exit(int(success))
|
||||
sys.exit(int(success))
|
||||
|
||||
Reference in New Issue
Block a user