(version: string, distro: string, opts?: RunWslOptions)
| 260 | } |
| 261 | |
| 262 | export async function installWslOpencode(version: string, distro: string, opts?: RunWslOptions) { |
| 263 | return runInteractiveCommand( |
| 264 | resolveSystem32Command("wsl.exe"), |
| 265 | wslArgs( |
| 266 | ["bash", "-lc", `curl -fsSL https://opencode.ai/install | bash -s -- --version ${shellEscape(version)}`], |
| 267 | distro, |
| 268 | ), |
| 269 | withTimeout(opts, DEFAULT_WSL_INSTALL_TIMEOUT_MS), |
| 270 | DEFAULT_WSL_INSTALL_TIMEOUT_MS, |
| 271 | ) |
| 272 | } |
| 273 | |
| 274 | export async function probeWslDistro(name: string, opts?: RunWslOptions): Promise<WslDistroProbe> { |
| 275 | const executable = await runWslInDistro(["/bin/true"], name, opts).catch((error) => ({ |
no test coverage detected