Skip to content

fix(coding-agent): accept Windows Store shell aliases - #9504

Open
petrroll wants to merge 1 commit into
earendil-works:mainfrom
petrroll:fix/windows-store-shell-alias
Open

petrroll wants to merge 1 commit into
earendil-works:mainfrom
petrroll:fix/windows-store-shell-alias

Conversation

@petrroll

Copy link
Copy Markdown
Contributor

Use accessSync(F_OK) for Windows shell validation, matching the check introduced incidentally by harness-v2's async refactor (617d8b3).

Node's existsSync() can reject runnable Store aliases because its stat check fails with EACCES (nodejs/node#36790). Keep Unix behavior and shell search order unchanged.

This would theoretically not be needed if libuv merges this fix (and node picks it up, and pi's users pick up new node): libuv/libuv#4986 or if pi switches main platform to be deno denoland/deno#18598 (comment) but seeing as both are unlikely to happen, this is best we can do for now.

Use accessSync(F_OK) for Windows shell validation, matching the check introduced incidentally by harness-v2's async refactor (617d8b3).

Node's existsSync() can reject runnable Store aliases because its stat check fails with EACCES (nodejs/node#36790). Keep Unix behavior and shell search order unchanged.
@petrroll

Copy link
Copy Markdown
Contributor Author

Helps with: #9490

@gaoanze888 gaoanze888 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified exact head 06e9594. On Windows, shellPathExists() replaces the existsSync() stat path with accessSync(F_OK), which matches the documented AppExecLink failure mode while leaving Unix behavior and shell search order unchanged. The focused Windows alias suite passes 4/4 locally and covers PATH-resolved bash/pwsh aliases, an explicit alias, and fallback after a failed existence check. No blocker found. Integration note only: #9501 also edits shell discovery, so whichever lands second should preserve this predicate for its new %ProgramFiles%/%SystemRoot% candidates. The current repository CI failure is the unrelated Google finish-reason exhaustiveness error tracked by #9570.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants