mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
fix returncode for clean
also fixes a typo
This commit is contained in:
+5
-6
@@ -2444,16 +2444,15 @@ def do_clean(
|
||||
if used_package in installed_package_names:
|
||||
del installed_package_names[installed_package_names.index(used_package)]
|
||||
|
||||
success = False
|
||||
failure = False
|
||||
for apparent_bad_package in installed_package_names:
|
||||
success = True
|
||||
|
||||
if dry_run:
|
||||
click.echo(apparent_bad_package)
|
||||
else:
|
||||
click.echo(crayons.white('Unintalling {0}…'.format(repr(apparent_bad_package)), bold=True))
|
||||
click.echo(crayons.white('Uninstalling {0}…'.format(repr(apparent_bad_package)), bold=True))
|
||||
|
||||
# Uninstall the package.
|
||||
delegator.run('{0} uninstall {1} -y'.format(which('pip'), apparent_bad_package))
|
||||
c = delegator.run('{0} uninstall {1} -y'.format(which('pip'), apparent_bad_package))
|
||||
failure |= c.return_code
|
||||
|
||||
sys.exit(int(success))
|
||||
sys.exit(int(failure))
|
||||
|
||||
Reference in New Issue
Block a user