fix: include Error in log message (#7955)

This addresses post-merge feedback from
https://github.com/openai/codex/pull/7856.
This commit is contained in:
Michael Bolin 2025-12-12 16:31:34 -08:00 committed by GitHub
parent b1905d3754
commit 7c18f7b680
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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}",
);
}
}
}