show warning if lockfile doesn't exist on clean

This commit is contained in:
Derek Schaller
2018-02-23 17:14:33 -08:00
parent 43e8732bae
commit eb57f0afae
+7 -1
View File
@@ -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))