Summary
Several new tests added in PR #392 use manual temp directory management (std::env::temp_dir() + timestamp + fs::remove_dir_all in cleanup) instead of the RAII tempfile::TempDir pattern.
Affected Files
Problem
If a test panics before reaching the cleanup code, temp directories are left behind. The RAII approach (already used in crates/pet-uv/src/lib.rs and crates/pet/tests/jsonrpc_server_test.rs) cleans up automatically even on unwind.
Proposed Fix
Replace manual temp dir management with tempfile::TempDir where it isn't already used.
Impact
Minor — leftover temp dirs on CI from panicked tests. Not a correctness issue.
Summary
Several new tests added in PR #392 use manual temp directory management (
std::env::temp_dir()+ timestamp +fs::remove_dir_allin cleanup) instead of the RAIItempfile::TempDirpattern.Affected Files
crates/pet-pixi/src/lib.rs(line ~112-116)crates/pet-windows-registry/src/lib.rs(line ~149-156)Problem
If a test panics before reaching the cleanup code, temp directories are left behind. The RAII approach (already used in
crates/pet-uv/src/lib.rsandcrates/pet/tests/jsonrpc_server_test.rs) cleans up automatically even on unwind.Proposed Fix
Replace manual temp dir management with
tempfile::TempDirwhere it isn't already used.Impact
Minor — leftover temp dirs on CI from panicked tests. Not a correctness issue.