From bb746a3624536d0ae6086200062ba6f1915cdaae Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 16 Sep 2019 11:37:52 -0400 Subject: [PATCH] oh yeah --- bake/cli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bake/cli.py b/bake/cli.py index 433fc2a..5214507 100644 --- a/bake/cli.py +++ b/bake/cli.py @@ -25,7 +25,7 @@ def indent(line): return f'{" " * 4}{line}' -def do_help(): +def do_help(exit=0): with click.Context(entrypoint) as ctx: help = entrypoint.get_help(ctx) help = help.replace( @@ -65,7 +65,7 @@ def do_help(): ) click.echo(help, err=True) - sys.exit(0) + sys.exit(exit) def echo_json(obj): @@ -192,7 +192,7 @@ def entrypoint( """bake — the strangely familiar task–runner.""" if help: - do_help + do_help(0) # Default to list behavior, when no task is provided. if _json: @@ -211,7 +211,7 @@ def entrypoint( bakefile = Bakefile(path=bakefile) except NoBakefileFound: click.echo(click.style("No Bakefile found!", fg="red"), err=True) - do_help() + do_help(1) if not insecure: for key in bakefile.environ: