Skip to content

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

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

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

Conversation

@dyk1454683243-sudo

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

Copy link
Copy Markdown

Fixes #157.

Windows 11 App Execution Aliases (for example %LOCALAPPDATA%\Microsoft\WindowsApps\mspaint.exe) are launchable PATH entries, but fs.stat() raises EACCES. Published isexe@4.0.0 then returns false (older isexe can throw), so which misses them.

This keeps which correct against current isexe by treating a Microsoft\WindowsApps path as executable when isexe misses or throws EACCES/EPERM and fs.access() succeeds. Other errors still propagate. POSIX behavior is unchanged.

Root-cause fix: isaacs/isexe#42 (Fixes npm/node-which#157). Related earlier attempt: isaacs/isexe#40. This which change does not wait on an isexe release.

Tests cover alias hits, absolute paths, EACCES/EPERM from isexe, unexpected errors, missing alias files, non-WindowsApps paths, POSIX, and { all: true }. Suite stays at 100% coverage.

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>
@dyk1454683243-sudo

Copy link
Copy Markdown
Author

Withdrawing this PR while I clean up a high-volume open-PR backlog. Sorry for the noise — happy to come back later with a focused change if useful.

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