Files
mattgodbolt-moltyandClaude Fable 5 ea0e4f0e19 Make --tmp-dir authoritative over inherited environment
setupTempDir now exports the configured directory as TMPDIR, TMP and
TEMP: os.tmpdir() consults TMPDIR first on POSIX, so the previous
TMP-only export let an inherited TMPDIR silently override --tmp-dir
(prod was protected only by sudo's env_reset). Restore the sanity check
from 613d7f688 (lost in the f94ff8332 refactor) so a mismatch fails
loudly, and log os.tmpdir() rather than TEMP||TMP, which printed
undefined on a default Linux run.

Also make the temp.ts exit hook synchronous: 'exit' handlers cannot
await, so the previous async cleanup never ran.

The temp-dir tests now save/restore individual variables rather than
reassigning process.env wholesale - a replaced process.env is a plain
object whose writes never reach the real environment (which os.tmpdir()
reads via safeGetenv), so the old approach leaked state between tests.

Fixes #8816.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:16:47 -05:00
..
2026-06-04 23:41:19 +02:00
2026-06-04 23:41:19 +02:00
2025-07-28 10:34:46 -05:00
2025-07-28 10:34:46 -05:00
2026-06-02 12:19:29 -05:00
2026-05-23 14:47:16 +03:00