fix: unify LSP server PATH resolution between detection and spawn (#2431)

This commit is contained in:
YeonGyu-Kim
2026-03-12 01:44:06 +09:00
parent 1c09b9869c
commit 9d0b56d375
3 changed files with 35 additions and 19 deletions
+15
View File
@@ -0,0 +1,15 @@
import { join } from "path"
import { getDataDir, getOpenCodeConfigDir } from "../../shared"
export function getLspServerAdditionalPathBases(workingDirectory: string): string[] {
const configDir = getOpenCodeConfigDir({ binary: "opencode" })
const dataDir = join(getDataDir(), "opencode")
return [
join(workingDirectory, "node_modules", ".bin"),
join(configDir, "bin"),
join(configDir, "node_modules", ".bin"),
join(dataDir, "bin"),
]
}