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 4d37f4f commit 8ee44cc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion qualibrate_runner/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ def _confirm(config_file: Path, exported_data: dict[str, Any]) -> None:
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(
"--overwrite",
type=bool,
Expand All @@ -134,6 +141,7 @@ def _confirm(config_file: Path, exported_data: dict[str, Any]) -> None:
def config_command(
ctx: click.Context,
config_path: Path,
auto_accept: bool,
overwrite: bool,
calibration_library_resolver: str,
calibration_library_folder: Path,
Expand All @@ -149,4 +157,4 @@ def config_command(
qrs = get_config_model_or_print_error(runner_config)
if qrs is None:
return
write_config(config_file, common_config, qrs)
write_config(config_file, common_config, qrs, confirm=not auto_accept)

0 comments on commit 8ee44cc

Please sign in to comment.