Make sure --verbose trumps --quiet

This is so that users can have a --quiet alias in their environment and only
occasionally add --verbose if they are surprised by the result.
This commit is contained in:
Łukasz Langa 2018-06-04 12:36:35 -07:00
parent 00a302560b
commit e5452a6b67

View File

@ -302,7 +302,8 @@ def main(
else:
err(f"invalid path: {s}")
if len(sources) == 0:
out("No paths given. Nothing to do 😴")
if verbose or not quiet:
out("No paths given. Nothing to do 😴")
ctx.exit(0)
return
@ -333,7 +334,7 @@ def main(
)
finally:
shutdown(loop)
if not quiet:
if verbose or not quiet:
out("All done! ✨ 🍰 ✨")
click.echo(str(report))
ctx.exit(report.return_code)