From 7c18f7b680506fcdbd9d692dbc8a1ace2cabe79d Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Fri, 12 Dec 2025 16:31:34 -0800 Subject: [PATCH] fix: include Error in log message (#7955) This addresses post-merge feedback from https://github.com/openai/codex/pull/7856. --- codex-rs/protocol/src/protocol.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/codex-rs/protocol/src/protocol.rs b/codex-rs/protocol/src/protocol.rs index 238cd0fa2..14dc426ce 100644 --- a/codex-rs/protocol/src/protocol.rs +++ b/codex-rs/protocol/src/protocol.rs @@ -425,14 +425,15 @@ impl SandboxPolicy { && let Some(tmpdir) = std::env::var_os("TMPDIR") && !tmpdir.is_empty() { - if let Ok(tmpdir_path) = - AbsolutePathBuf::from_absolute_path(PathBuf::from(&tmpdir)) - { - roots.push(tmpdir_path); - } else { - error!( - "Ignoring invalid TMPDIR value {tmpdir:?} for sandbox writable root", - ); + match AbsolutePathBuf::from_absolute_path(PathBuf::from(&tmpdir)) { + Ok(tmpdir_path) => { + roots.push(tmpdir_path); + } + Err(e) => { + error!( + "Ignoring invalid TMPDIR value {tmpdir:?} for sandbox writable root: {e}", + ); + } } }