diff options
| author | Frainer Encarnación <[email protected]> | 2025-12-29 13:02:46 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-29 11:02:46 -0600 |
| commit | 337681dbbf0b0b27fc9f0e720708b08891e4e2fd (patch) | |
| tree | 2170ad79b1d6b2960cefc9cc869f67d7853627e5 | |
| parent | 66afc034d17bd47ea12c1c2e3c14f8d75acb7bce (diff) | |
| download | opencode-337681dbbf0b0b27fc9f0e720708b08891e4e2fd.tar.gz opencode-337681dbbf0b0b27fc9f0e720708b08891e4e2fd.zip | |
fix(lsp): ESLint LSP server fails to auto-install on Windows (#6366)
| -rw-r--r-- | packages/opencode/src/lsp/server.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/opencode/src/lsp/server.ts b/packages/opencode/src/lsp/server.ts index ba51ba663..f56f1b194 100644 --- a/packages/opencode/src/lsp/server.ts +++ b/packages/opencode/src/lsp/server.ts @@ -196,13 +196,14 @@ export namespace LSPServer { } await fs.rename(extractedPath, finalPath) - await $`npm install`.cwd(finalPath).quiet() - await $`npm run compile`.cwd(finalPath).quiet() + const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm" + await $`${npmCmd} install`.cwd(finalPath).quiet() + await $`${npmCmd} run compile`.cwd(finalPath).quiet() log.info("installed VS Code ESLint server", { serverPath }) } - const proc = spawn(BunProc.which(), ["--max-old-space-size=8192", serverPath, "--stdio"], { + const proc = spawn(BunProc.which(), [serverPath, "--stdio"], { cwd: root, env: { ...process.env, |
