Conversation
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.
Contributor
Author
|
Helps with: #9490 |
gaoanze888
approved these changes
Sep 14, 2026
gaoanze888
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.