fix: add --runas param for wutta typer commands
subcommand logic is responsible for doing something with it, if needed
This commit is contained in:
parent
0588a0a2d3
commit
cbfa7139e4
1 changed files with 9 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ def make_cli_config(ctx: typer.Context):
|
||||||
return make_config(files=ctx.params.get("config_paths") or None)
|
return make_config(files=ctx.params.get("config_paths") or None)
|
||||||
|
|
||||||
|
|
||||||
def typer_callback(
|
def typer_callback( # pylint: disable=unused-argument
|
||||||
ctx: typer.Context,
|
ctx: typer.Context,
|
||||||
config_paths: Annotated[
|
config_paths: Annotated[
|
||||||
Optional[List[Path]],
|
Optional[List[Path]],
|
||||||
|
|
@ -73,7 +73,14 @@ def typer_callback(
|
||||||
help="Config path (may be specified more than once)",
|
help="Config path (may be specified more than once)",
|
||||||
),
|
),
|
||||||
] = None,
|
] = None,
|
||||||
): # pylint: disable=unused-argument
|
runas_username: Annotated[
|
||||||
|
str,
|
||||||
|
typer.Option(
|
||||||
|
"--runas",
|
||||||
|
help="Username responsible for running the command (where applicable).",
|
||||||
|
),
|
||||||
|
] = None,
|
||||||
|
):
|
||||||
"""
|
"""
|
||||||
Generic callback for use with top-level commands. This adds some
|
Generic callback for use with top-level commands. This adds some
|
||||||
top-level args:
|
top-level args:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue