From: Łukasz Langa Date: Mon, 4 Jun 2018 19:36:35 +0000 (-0700) Subject: Make sure --verbose trumps --quiet X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/e5452a6b676c161d01ae0ac6cbb5a7cc4c395745?ds=sidebyside 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. --- diff --git a/black.py b/black.py index 36e49b0..c8c381c 100644 --- a/black.py +++ b/black.py @@ -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)