Fix bug where --clear option is not supported for clearing cache

This commit is contained in:
jxltom
2018-12-05 10:07:55 +08:00
parent cae8d76c21
commit 1f75cac01e
+6 -10
View File
@@ -62,18 +62,15 @@ def cli(
state,
where=False,
venv=False,
rm=False,
bare=False,
three=False,
python=False,
help=False,
py=False,
envs=False,
man=False,
rm=False,
bare=False,
completion=False,
pypi_mirror=None,
man=False,
support=None,
clear=False,
help=False,
site_packages=False,
**kwargs
):
# Handle this ASAP to make shell startup fast.
@@ -143,10 +140,9 @@ def cli(
get_pipenv_diagnostics()
return 0
# --clear was passed…
elif clear:
elif state.clear:
do_clear()
return 0
# --venv was passed…
elif venv:
# There is no virtualenv yet.