mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Add explicit message if there is nothing to be removed during uninstall
This commit is contained in:
+7
-6
@@ -1154,16 +1154,17 @@ def do_purge(bare=False, downloads=False, allow_global=False):
|
||||
# Remove setuptools, pip, etc from targets for removal
|
||||
to_remove = installed - bad_pkgs
|
||||
|
||||
# Skip purging if there is no packages which needs to be removed
|
||||
if not to_remove:
|
||||
if not bare:
|
||||
click.echo("Found 0 installed package, skip purging.")
|
||||
click.echo(crayons.green("Environment now purged and fresh!"))
|
||||
return installed
|
||||
|
||||
if not bare:
|
||||
click.echo(
|
||||
fix_utf8("Found {0} installed package(s), purging…".format(len(to_remove)))
|
||||
)
|
||||
|
||||
# Skip purging if there is no packages which needs to be removed
|
||||
if not to_remove:
|
||||
if not bare:
|
||||
click.echo(crayons.green("Environment now purged and fresh!"))
|
||||
return installed
|
||||
|
||||
command = "{0} uninstall {1} -y".format(
|
||||
escape_grouped_arguments(which_pip(allow_global=allow_global)),
|
||||
|
||||
Reference in New Issue
Block a user