fix(host-core): detect MSIX Store pwsh app-execution aliases - #632
Merged
vastsa merged 2 commits intoSep 20, 2026
Merged
Conversation
) Windows PATH probing used Path::is_file(), which opens the candidate with CreateFileW. Microsoft Store app-execution aliases (IO_REPARSE_TAG_APPEXECLINK) return ERROR_CANT_ACCESS_FILE, so PowerShell 7 installed via winget's msixbundle was reported missing even though pwsh runs. Probe via GetFileAttributesExW and accept existing non-directory .exe files, including zero-size reparse aliases. fixes vastsa#607
Frank-zhu0404
marked this pull request as ready for review
September 20, 2026 03:23
Owner
|
审查结论:实现方向无原则问题,但当前验证缺 Windows 编译和真实 MSIX Store alias 运行;Linux 只覆盖属性 helper,不能证明 Win32 API 路径。请补 Windows target/实机验证后再合入。 |
vastsa
approved these changes
Sep 20, 2026
vastsa
left a comment
Owner
There was a problem hiding this comment.
已审查实现并在 PR head 上完成 x86_64-pc-windows-gnu 的 host-core cargo check;属性测试覆盖 alias/目录/缺失路径。真实 MSIX Store alias 仍需后续 Windows 实机回归,但无原则或架构级阻塞,可合入。
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.
Summary
windows-pwsh, because PATH lands on a zero-byte Store app-execution alias (IO_REPARSE_TAG_APPEXECLINKunderWindowsApps).Path::is_file()/CreateFileW, which returnsERROR_CANT_ACCESS_FILE(1920) on those aliases, so probe 2 discarded a workingpwsh.exe.GetFileAttributesExWand accept existing non-directory.exepaths, including zero-size reparse aliases. Do not use size > 0 as a validity check.Fixes #607
Test plan
cargo fmt -p host-core -- --checkcargo test -p host-core --locked shell::— 12 passed (includes Store alias attrs0x420/ tag0x8000001B, normal file, directory, missing path)wingetPowerShell 7 with no%ProgramFiles%\PowerShell\7— Settings → command shell shows PowerShell 7; Bash launches it via theWindowsAppsalias%ProgramFiles%\PowerShell\7\pwsh.exe(probe 1 unchanged)Notes
-D warningscurrently fails on unrelated pre-existinguseless_formatinuser_skills.rs(not touched here).