Skip to content

[BUG] OpenCode installs to WSL on Windows #11256

Description

@judahx67

Description

OpenCode would install to WSL on Windows if WSL is enabled.

Installation methods tried:
- curl -fsSL https://opencode.ai/install | bash
- npm install -g opencode-ai
I have yet to try using chocolatey due to permission on this machine.

Workaround:

I was able to install it correctly by using a terminal with a native Unix emulation layer (MinGW64/Git Bash) to run the curl command, then manually adding the binary to my system PATH.

Environment
OS: Windows 10/11
WSL Status: Enabled
Shell: PowerShell / CMD

Plugins

No response

OpenCode version

1.1.43

Steps to reproduce

  1. Enable WSL feature on Windows and install one of the distros.
  2. Run curl -fsSL https://opencode.ai/install | bash
  3. Installation script should notify that the command is added to a Unix path and using opencode in the terminall will not work (both powershell and cmd)
  4. Verify by going into wsl and do opencode

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions