Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion codex-rs/core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ pub fn set_project_trusted(codex_home: &Path, project_path: &Path) -> anyhow::Re

// create a tmp_file
let tmp_file = NamedTempFile::new_in(codex_home)?;
std::fs::write(tmp_file.path(), doc.to_string())?;
let val: TomlValue = doc.to_string().parse::<TomlValue>()?;
let pretty = toml::to_string_pretty(&val)?;
std::fs::write(tmp_file.path(), pretty)?;

// atomically move the tmp file into config.toml
tmp_file.persist(config_path)?;
Expand Down
Loading