Files
worktrunk/templates
Wu Shuwen f7735f2ec8 fix(shell): treat PowerShell directive paths literally (#4680)
When the PowerShell temporary directory contains wildcard characters
such as `temp[1]`, `wt switch` can finish without changing the parent
shell's directory. The directive file is written, but the wrapper treats
its path as a wildcard during lookup and cleanup, leaving the file
behind.

Use `-LiteralPath` for all four directive-file operations. Add a
regression that checks both the directory change and removal of the
temporary file, and refresh the generated PowerShell snapshot.

Validation: all 4 PowerShell integration tests pass with all features
enabled, including the new regression. The shell-generation snapshot
test, pre-commit checks (including clippy), doctests and rustdoc also
pass. The original template reproduced the failure on Windows PowerShell
5; the corrected template switches directories and leaves no directive
file on both Windows PowerShell 5 and PowerShell 7.6.9.

The full `hook pre-merge --yes` gate did not pass on this Windows host:
4,693 passed, 74 failed, 40 skipped. Failures include
configuration/statusline snapshots, switch tests and the performance
helper CLI; those failures and snapshots are outside this change and
were not accepted or modified.
2026-11-04 21:19:32 -08:00
..