mirror of
https://github.com/software-mansion/argent.git
synced 2026-09-14 19:27:14 +08:00
98b9e71dc5
useTempHome() stashed the ambient HOME/USERPROFILE in module-level variables, so two overlapping scopeHome() calls shared one slot: the inner call overwrote the outer's saved values with the outer's temp dir, and the outer restore then put back an already-deleted directory. The temp home now returns a restorer closing over its own snapshot, so nested scopes unwind LIFO-correctly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>