Repository navigation
fix(powershell): use Windows cwd for WSL UNC startup - #462
Conversation
Kuddev
left a comment
There was a problem hiding this comment.
Reviewed 131c70d against main 79e594d. Updating the branch preserved the three-file fix without conflict or further source changes. The platform adapter limits the cwd adjustment to native PowerShell/pwsh on WSL UNC prefixes; ordinary local/SMB directories and WSL shells retain their cwd, shell/argv remain unchanged, and pane startup metadata reads the prepared PTY cwd. No merge-blocking finding.
Local exact-head verification: powershell_wsl_unc_startup_uses_home_without_changing_the_launch, powershell_cmd_launchers_inherit_the_prepared_windows_directory, and ordinary_network_directories_and_wsl_launches_keep_their_startup_cwd all pass. The child-process test exercised installed Windows PowerShell 5.1 plus the existing portable PowerShell 7.6.4, CMD and a .cmd shim. The first local run reported program-not-found because pwsh was not on PATH; re-running with its existing directory added only to the test process environment passed. No product/test assertion or machine-wide configuration was changed.
All ten required checks and all five native jobs succeeded for this exact head in run 38508873422. No full local test suite, live WSL guest login or interactive pane acceptance is claimed.
Result / 用户结果
Native PowerShell started from a WSL UNC directory cannot pass that cwd to CMD-based launchers, which fall back to the Windows directory. PowerShell/pwsh now starts in the existing Windows home directory for
wsl.localhostandwsl$paths, and initial pane metadata follows the prepared launch cwd. Fixes #195.Design / 设计边界
Evidence / 验证依据
.cmdchild cwd.Required Review / 必须确认
CONTRIBUTING.md,docs/architecture.md, anddocs/project-constraints.md.python3 scripts/check_architecture.py --base <PR-base-commit>passes; budgets were not inflated to fit the change.