fix(cli): ignore empty config sections

This commit is contained in:
yungchentang 2026-07-04 06:56:55 -07:00 committed by Teknium
parent bd16395255
commit bdecf0ab94
2 changed files with 14 additions and 0 deletions

View file

@ -150,6 +150,18 @@ class TestLoadConfigCacheEnvStaleness:
class TestLoadCliConfigExpansion:
"""Verify that load_cli_config() also expands ${VAR} references."""
def test_cli_config_ignores_empty_terminal_section(self, tmp_path, monkeypatch):
config_file = tmp_path / "config.yaml"
config_file.write_text("terminal:\n")
monkeypatch.setattr("cli._hermes_home", tmp_path)
from cli import load_cli_config
config = load_cli_config()
assert isinstance(config["terminal"], dict)
assert config["terminal"]["env_type"] == "local"
def test_cli_config_expands_auxiliary_api_key(self, tmp_path, monkeypatch):
config_yaml = (
"auxiliary:\n"