diff --git a/rust2rpm/conf.py b/rust2rpm/conf.py index 50c782c..0f22493 100644 --- a/rust2rpm/conf.py +++ b/rust2rpm/conf.py @@ -530,6 +530,11 @@ def load_config(features: set[str], target: str) -> TomlConf: except FileNotFoundError as exc: tomlconf = None + except tomllib.TOMLDecodeError as exc: + log.error("Cannot read rust2rpm.toml file (TOML syntax error):") + log.error(str(exc)) + sys.exit(1) + except jsonschema.ValidationError as exc: if not exc.path: log.error("Invalid rust2rpm.toml file (unknown setting or table):")