Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the Desktop WSL distro probe so it verifies command execution using the distro’s PATH (running true) instead of hardcoding /bin/true, which breaks on non-FHS distros like NixOS WSL.
Changes:
- Update
probeWslDistro()to runtrueviaPATHrather than/bin/true. - Add a regression test asserting the probe invokes
wsl -d <distro> -- true.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/desktop/src/main/wsl/runtime.ts | Switches the execution probe from /bin/true to true resolved via distro PATH. |
| packages/desktop/src/main/wsl/runtime.test.ts | Adds a mocked-child-process test ensuring the probe uses true (not an absolute path). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Overall: correct and worthwhile — hardcoding
The mocked-spawn test asserting the exact argv ( |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #44508
Type of change
What does this PR do?
The WSL probe assumes every distro has
/bin/true. NixOS does not, so Desktop reports that the distro still needs first-run setup. This usestruefrom the distro PATH instead and adds a test for the exact WSL arguments.How did you verify your code works?
bun test src/main/wsl/runtime.test.tsandbun typecheckfrompackages/desktop.wsl.exe -d nixos -- trueexits 0 on the affected system.Screenshots / recordings
Not applicable; this is a WSL probe fix with no UI changes.
Checklist