Skip to content

Commit 337681d

Browse files
authored
fix(lsp): ESLint LSP server fails to auto-install on Windows (anomalyco#6366)
1 parent 66afc03 commit 337681d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

packages/opencode/src/lsp/server.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,14 @@ export namespace LSPServer {
196196
}
197197
await fs.rename(extractedPath, finalPath)
198198

199-
await $`npm install`.cwd(finalPath).quiet()
200-
await $`npm run compile`.cwd(finalPath).quiet()
199+
const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm"
200+
await $`${npmCmd} install`.cwd(finalPath).quiet()
201+
await $`${npmCmd} run compile`.cwd(finalPath).quiet()
201202

202203
log.info("installed VS Code ESLint server", { serverPath })
203204
}
204205

205-
const proc = spawn(BunProc.which(), ["--max-old-space-size=8192", serverPath, "--stdio"], {
206+
const proc = spawn(BunProc.which(), [serverPath, "--stdio"], {
206207
cwd: root,
207208
env: {
208209
...process.env,

0 commit comments

Comments
 (0)