Skip to content

Commit

Permalink
Merge remote-tracking branch 'pr3064/master' into merge-prs
Browse files Browse the repository at this point in the history
- Closes #3064

Signed-off-by: Dan Ryan <dan@danryan.co>
  • Loading branch information
techalchemy committed Oct 30, 2018
2 parents d4daf91 + efaa7fa commit 1077962
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions news/3041.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--bare now has an effect on clean, and sync's bare option is now used to reduce output.
1 change: 1 addition & 0 deletions pipenv/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ def sync(


@cli.command(short_help="Uninstalls all packages not specified in Pipfile.lock.")
@option("--bare", is_flag=True, default=False, help="Minimal output.")
@option("--dry-run", is_flag=True, default=False, help="Just output unneeded packages.")
@verbose_option
@three_option
Expand Down
13 changes: 7 additions & 6 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2582,7 +2582,8 @@ def do_sync(
deploy=deploy,
system=system,
)
click.echo(crayons.green("All dependencies are now up-to-date!"))
if not bare:
click.echo(crayons.green("All dependencies are now up-to-date!"))


def do_clean(ctx, three=None, python=None, dry_run=False, bare=False, pypi_mirror=None):
Expand Down Expand Up @@ -2611,14 +2612,14 @@ def do_clean(ctx, three=None, python=None, dry_run=False, bare=False, pypi_mirro
)]
failure = False
for apparent_bad_package in installed_package_names:
if dry_run:
if dry_run and not bare:
click.echo(apparent_bad_package)
else:
click.echo(
crayons.white(
fix_utf8("Uninstalling {0}…".format(repr(apparent_bad_package))), bold=True
if not bare:
click.echo(
crayons.white(
fix_utf8("Uninstalling {0}…".format(repr(apparent_bad_package))), bold=True
)
)
# Uninstall the package.
c = delegator.run(
"{0} uninstall {1} -y".format(which_pip(), apparent_bad_package)
Expand Down

0 comments on commit 1077962

Please sign in to comment.