From b67f16683f453346cf8b95dcd051ee99a48fd2c5 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim <219906144+aibrahim-oai@users.noreply.github.com> Date: Fri, 13 Mar 2026 16:37:43 +0000 Subject: [PATCH] tests(tui): escape malformed rules trust path Co-authored-by: Codex --- codex-rs/tui/src/chatwidget/agent.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/tui/src/chatwidget/agent.rs b/codex-rs/tui/src/chatwidget/agent.rs index 9421d85bc0..685424b625 100644 --- a/codex-rs/tui/src/chatwidget/agent.rs +++ b/codex-rs/tui/src/chatwidget/agent.rs @@ -169,11 +169,11 @@ mod tests { codex_home: &Path, cwd: &Path, ) -> std::io::Result { - let cwd_display = cwd.display(); + let cwd_display = cwd.display().to_string().replace('\'', "''"); let config_contents = format!( r#"model_provider = "ollama" -[projects."{cwd_display}"] +[projects.'{cwd_display}'] trust_level = "trusted" "# );