Fix _validate_key to handle click 8.3.1 Sentinel values
Fixes #5836 Updates the condition in _validate_key to properly check for click._utils.UNSET sentinel value, which is now present in ctx.params during callbacks in click 8.3.1.
This commit is contained in:
parent
88a65bb374
commit
ec942ef2f3
1 changed files with 1 additions and 2 deletions
|
|
@ -858,8 +858,7 @@ def _validate_key(ctx: click.Context, param: click.Parameter, value: t.Any) -> t
|
|||
ctx.params["cert"] = cert, value
|
||||
|
||||
else:
|
||||
if cert and not (is_adhoc or is_context):
|
||||
raise click.BadParameter('Required when using "--cert".', ctx, param)
|
||||
if cert is not None and cert != click._utils.UNSET and not (is_adhoc or is_context): raise click.BadParameter('Required when using "--cert".', ctx, param)
|
||||
|
||||
return value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue