From 4bc587a1952b4db8df0dae66bc1ac58533d094ef Mon Sep 17 00:00:00 2001 From: Maxim V4S Date: Wed, 28 Aug 2024 10:53:57 +0300 Subject: [PATCH] feat: add auto-accept config flag --- backend/qualibrate_app/cli/config.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/qualibrate_app/cli/config.py b/backend/qualibrate_app/cli/config.py index 96cc32a6..a90ce311 100644 --- a/backend/qualibrate_app/cli/config.py +++ b/backend/qualibrate_app/cli/config.py @@ -147,6 +147,13 @@ def write_config( 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, @@ -221,6 +228,7 @@ def write_config( def config_command( ctx: click.Context, config_path: Path, + auto_accept: bool, overwrite: bool, static_site_files: Path, storage_type: StorageType, @@ -246,4 +254,4 @@ def config_command( ) if qss is None: return - write_config(config_file, common_config, qss) + write_config(config_file, common_config, qss, confirm=not auto_accept)