Skip to content

Conversation

@ollie-anthropic
Copy link
Collaborator

Summary

WSL2+ uses the same bubblewrap sandboxing as Linux, so it should be supported. WSL1 does not support bubblewrap properly.

Changes

  • Add getWslVersion() to detect WSL version from /proc/version
  • Update isSupportedPlatform() to check for WSL1 and reject it
  • Remove 'wsl' from Platform type (getPlatform returns 'linux' for WSL)
  • Update comments to clarify Linux/WSL glob pattern handling

Testing

  • All 225 tests pass
  • Logic: macOS ✓, non-WSL Linux ✓, WSL2+ ✓, WSL1 ✗

WSL2+ uses the same bubblewrap sandboxing as Linux, so it should be
supported. WSL1 does not support bubblewrap properly.

- Add getWslVersion() to detect WSL version from /proc/version
- Update isSupportedPlatform() to check for WSL1 and reject it
- Remove 'wsl' from Platform type (getPlatform returns 'linux' for WSL)
- Update comments to clarify Linux/WSL glob pattern handling
* Get the WSL version (1 or 2+) if running in WSL.
* Returns undefined if not running in WSL.
*/
export function getWslVersion(): string | undefined {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

took this from claude-cli code :)

@ollie-anthropic ollie-anthropic force-pushed the ollie/fix-wsl-platform-check branch from 254d82e to d612cb7 Compare January 21, 2026 06:34
enableLogMonitor?: boolean,
): Promise<void>
isSupportedPlatform(platform: Platform): boolean
isSupportedPlatform(): boolean
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

api changed here but i really think it's unused and this is cleaner

Copy link
Collaborator

@dylan-conway dylan-conway left a comment

Choose a reason for hiding this comment

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

nice

@ollie-anthropic ollie-anthropic merged commit cc249f0 into main Jan 21, 2026
8 checks passed
const supportedPlatforms: Platform[] = ['macos', 'linux']
return supportedPlatforms.includes(platform)
function isSupportedPlatform(): boolean {
const platform = getPlatform()
Copy link
Collaborator

@ant-kurt ant-kurt Jan 21, 2026

Choose a reason for hiding this comment

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

This could add latency due to containing a sync FS call (reading the /proc/version)

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.

4 participants