INNER CODE UNIT · Python
validate_vars
chaostoolkit/chaostoolkit · chaostoolkit/commands/run.py:45
def validate_vars(
ctx: click.Context, param: click.Option, value: list[str]
) -> dict[str, Any]:
"""
Process all `--var key=value` and return a dictionary of them with the
value converted to the appropriate type.
"""
try:
return convert_vars(value)
except ValueError as x:
raise click.BadParameter(str(x))
@click.command()
@click.option(
"--journal-path",
default="./journal.json",
help="Path where to save the journal from the execution.",