fix(runtime): filter Windows MS Store Python stubs and verify runnabi…#457
Open
maxwell-orange wants to merge 1 commit intomksglu:nextfrom
Open
fix(runtime): filter Windows MS Store Python stubs and verify runnabi…#457maxwell-orange wants to merge 1 commit intomksglu:nextfrom
maxwell-orange wants to merge 1 commit intomksglu:nextfrom
Conversation
…lity (mksglu#455) On Windows, `where python` and `where python3` match the Microsoft Store App Execution Alias stubs under %LOCALAPPDATA%\Microsoft\WindowsApps\ even when no real Python is installed. Those stubs exit 9009 and pop the Microsoft Store, so detectRuntimes() reported python as available but every spawn failed. Add runnableExists() helper that (1) on Windows filters `where` results under \Microsoft\WindowsApps\ and (2) on all platforms verifies `<cmd> --version` exits 0 within 5s. Use it for python/python3 detection and add `py` (Windows Python launcher) as a final fallback. Verified locally: 12 Python executor tests in tests/executor.test.ts that previously failed on Windows now pass.
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.
…lity (#455)
On Windows,
where pythonandwhere python3match the Microsoft Store App Execution Alias stubs under %LOCALAPPDATA%\Microsoft\WindowsApps\ even when no real Python is installed. Those stubs exit 9009 and pop the Microsoft Store, so detectRuntimes() reported python as available but every spawn failed.Add runnableExists() helper that (1) on Windows filters
whereresults under \Microsoft\WindowsApps\ and (2) on all platforms verifies<cmd> --versionexits 0 within 5s. Use it for python/python3 detection and addpy(Windows Python launcher) as a final fallback.Verified locally: 12 Python executor tests in tests/executor.test.ts that previously failed on Windows now pass.
What / Why / How
Affected platforms
Test plan
Checklist
npm testpassesnpm run typecheckpassesnextbranch (unless hotfix)Cross-platform notes
Our CI runs on Ubuntu, macOS, and Windows.
path.join()/path.resolve(), never hardcode/separatorsreadFileSync(0)breaks on Windowsos.tmpdir(), never hardcode/tmp