mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 06:20:29 +00:00
fix(lsp): ESLint LSP server fails to auto-install on Windows (#6366)
This commit is contained in:
parent
66afc034d1
commit
337681dbbf
1 changed files with 4 additions and 3 deletions
|
|
@ -196,13 +196,14 @@ export namespace LSPServer {
|
||||||
}
|
}
|
||||||
await fs.rename(extractedPath, finalPath)
|
await fs.rename(extractedPath, finalPath)
|
||||||
|
|
||||||
await $`npm install`.cwd(finalPath).quiet()
|
const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm"
|
||||||
await $`npm run compile`.cwd(finalPath).quiet()
|
await $`${npmCmd} install`.cwd(finalPath).quiet()
|
||||||
|
await $`${npmCmd} run compile`.cwd(finalPath).quiet()
|
||||||
|
|
||||||
log.info("installed VS Code ESLint server", { serverPath })
|
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,
|
cwd: root,
|
||||||
env: {
|
env: {
|
||||||
...process.env,
|
...process.env,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue