config: remove accidental scheme validation circumvention, improve errors, warn on config loading failure in main()

This will fail on values of the wrong type, but still warn about and allow unknown keys.
This commit is contained in:
InsanePrawn 2022-11-09 16:28:09 +01:00
parent 7d96d05165
commit 11125e525f
3 changed files with 9 additions and 7 deletions

View file

@ -30,6 +30,8 @@ def cli(verbose: bool = False, config_file: Optional[str] = None, wrapper_overri
config.runtime.no_wrap = wrapper_override is False
config.runtime.error_shell = error_shell
config.try_load_file(config_file)
if config.file_state.exception:
logging.warning(f"Config file couldn't be loaded: {config.file_state.exception}")
if wrapper_override:
enforce_wrap()