Skip to content

Commit

Permalink
Add --verbose option to print credentials location (ofek#76)
Browse files Browse the repository at this point in the history
Add --verbose option to print credentials location
  • Loading branch information
hugovk authored Oct 7, 2019
2 parents 13ace4e + 25c9b2a commit b7076aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pypinfo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
@click.option('--all', 'all_installers', is_flag=True, help='Show downloads by all installers, not only pip.')
@click.option('--percent', '-pc', is_flag=True, help='Print percentages.')
@click.option('--markdown', '-md', is_flag=True, help='Output as Markdown.')
@click.option('--verbose', '-v', is_flag=True, help='Print debug messages to stderr.')
@click.version_option()
@click.pass_context
def pypinfo(
Expand All @@ -104,6 +105,7 @@ def pypinfo(
all_installers,
percent,
markdown,
verbose,
):
"""Valid fields are:\n
project | version | file | pyversion | percent3 | percent2 | impl | impl-version |\n
Expand All @@ -115,6 +117,9 @@ def pypinfo(
click.echo('Credentials location set to "{}".'.format(get_credentials()))
return

if verbose:
click.echo('Credentials location set to "{}".'.format(get_credentials()), err=True)

if project is None and not fields:
click.echo(ctx.get_help())
return
Expand Down

0 comments on commit b7076aa

Please sign in to comment.