Skip to content

fix: treat Windows App Execution Aliases as executable - #2

Open
dyk1454683243-sudo wants to merge 1 commit into
mainfrom
cursor/fix-windows-app-aliases-912e
Open

dyk1454683243-sudo wants to merge 1 commit into
mainfrom
cursor/fix-windows-app-aliases-912e

Conversation

@dyk1454683243-sudo

@dyk1454683243-sudo dyk1454683243-sudo commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Upstream PR: npm#184

Fixes npm#157.

This branch is the same change as the upstream PR. Root-cause companion: isaacs/isexe#42

Open in Web Open in Cursor 

WindowsApps aliases such as mspaint.exe raise EACCES from fs.stat, so
isexe reports them as non-executable. After an isexe miss or EACCES/EPERM,
treat Microsoft\WindowsApps paths as executable when fs.access succeeds.

Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-20T18:27:28.777633Z 4760762 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4760762b48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/index.js
Comment on lines +20 to +21
await access(p, constants.F_OK)
return true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve PATHEXT filtering in the alias fallback

On Windows, any existing path beneath a directory named Microsoft\WindowsApps is now accepted after isexe returns false, even when it rejected the path because its extension is absent from PATHEXT or because it is a directory. For example, which('notes.txt', { path: windowsAppsDir }) prepends the extensionless candidate because the command contains a dot; isexe correctly rejects .txt, but this F_OK check then returns it as executable. The synchronous helper has the same issue. Restrict the fallback to valid executable extensions and to the specific condition that identifies an app execution alias.

Useful? React with 👍 / 👎.

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.

[BUG] EACCES Error with Windows 11 App Execution Aliases

2 participants