Skip to content
Myr

Do not show help or version if resilent parsing is enabled.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 9877d9a · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:click/decorators.py+2 added-2 removed
222 unmodified lines
223 prog_name = attrs.pop('prog_name', None)224 message = attrs.pop('message', '%(prog)s, version %(version)s')225226 def callback(ctx, param, value):227 if not value:227 if value or ctx.resilient_parsing:228 return229 prog = prog_name230 if prog is None:231 prog = ctx.find_root().info_name
38 unmodified lines
270 All arguments are forwarded to :func:`option`.271 """272 def decorator(f):273 def callback(ctx, param, value):274 if value:274 if value and not ctx.resilient_parsing:275 echo(ctx.get_help())276 ctx.exit()277 attrs.setdefault('is_flag', True)278 attrs.setdefault('expose_value', False)
9 unmodified lines