Add config subcommand to validate configuration

This commit is contained in:
Dylan
2025-09-26 12:49:15 -07:00
committed by Dylan Hurd
parent 1fba99ed85
commit f139e573ac
3 changed files with 83 additions and 0 deletions
+9
View File
@@ -254,6 +254,15 @@ pub fn load_config_as_toml_with_cli_overrides(
Ok(cfg)
}
/// Load `config.toml` from `codex_home`, apply CLI overrides, and deserialize
/// it into [`ConfigToml`].
pub fn load_config_from_toml(
codex_home: &Path,
cli_overrides: Vec<(String, TomlValue)>,
) -> std::io::Result<ConfigToml> {
load_config_as_toml_with_cli_overrides(codex_home, cli_overrides)
}
/// Read `CODEX_HOME/config.toml` and return it as a generic TOML value. Returns
/// an empty TOML table when the file does not exist.
pub fn load_config_as_toml(codex_home: &Path) -> std::io::Result<TomlValue> {