Skip to content

Commit

Permalink
feat: add auto-accept config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-v4s committed Aug 28, 2024
1 parent 8658b9f commit d9a81a2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion qualibrate_composite/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ def _get_user_storage() -> Path:
default=QUALIBRATE_PATH / DEFAULT_CONFIG_FILENAME,
show_default=True,
)
@click.option(
"--auto-accept",
type=bool,
is_flag=True,
default=False,
show_default=True,
)
@click.option(
"--spawn-runner",
type=bool, # TODO: add type check for addr
Expand Down Expand Up @@ -308,6 +315,7 @@ def _get_user_storage() -> Path:
def config_command(
ctx: click.Context,
config_path: Path,
auto_accept: bool,
spawn_app: bool,
spawn_runner: bool,
runner_address: str,
Expand Down Expand Up @@ -336,4 +344,4 @@ def config_command(
common_config[QAPP_CONFIG_KEY] = _get_qapp_config(ctx, qs).model_dump(
mode="json"
)
write_config(config_file, common_config, qs)
write_config(config_file, common_config, qs, confirm=not auto_accept)

0 comments on commit d9a81a2

Please sign in to comment.