Skip to content
This repository was archived by the owner on May 2, 2026. It is now read-only.

Commit bcc5e7d

Browse files
committed
feat: allow disabling of initial config creation
1 parent df8e925 commit bcc5e7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

viu_media/cli/config/loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _handle_first_run(self) -> AppConfig:
7171

7272
return app_config
7373

74-
def load(self, update: Dict = {}) -> AppConfig:
74+
def load(self, update: Dict = {}, allow_setup=True) -> AppConfig:
7575
"""
7676
Loads the configuration and returns a populated, validated AppConfig object.
7777
@@ -84,7 +84,7 @@ def load(self, update: Dict = {}) -> AppConfig:
8484
Raises:
8585
ConfigError: If the configuration file contains validation or parsing errors.
8686
"""
87-
if not self.config_path.exists():
87+
if not self.config_path.exists() and allow_setup:
8888
return self._handle_first_run()
8989

9090
try:

0 commit comments

Comments
 (0)