Skip to content

Commit 7b6252f

Browse files
committed
remove env merging from createServerOptions
1 parent 7343511 commit 7b6252f

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

packages/core/src/shared/lsp/utils/platform.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
import { ToolkitError } from '../../errors'
7-
import { Logger, getLogger } from '../../logger/logger'
7+
import { Logger } from '../../logger/logger'
88
import { ChildProcess } from '../../utilities/processUtils'
99
import { waitUntil } from '../../utilities/timeoutUtils'
1010
import { isDebugInstance } from '../../vscode/env'
@@ -87,14 +87,12 @@ export function createServerOptions({
8787
serverModule,
8888
execArgv,
8989
warnThresholds,
90-
env,
9190
}: {
9291
encryptionKey: Buffer
9392
executable: string[]
9493
serverModule: string
9594
execArgv: string[]
9695
warnThresholds?: { cpu?: number; memory?: number }
97-
env?: Record<string, string>
9896
}) {
9997
return async () => {
10098
const bin = executable[0]
@@ -103,18 +101,7 @@ export function createServerOptions({
103101
args.unshift('--inspect=6080')
104102
}
105103

106-
// Merge environment variables
107-
const processEnv = { ...process.env }
108-
if (env) {
109-
Object.assign(processEnv, env)
110-
}
111-
112-
const lspProcess = new ChildProcess(bin, args, {
113-
warnThresholds,
114-
spawnOptions: {
115-
env: processEnv,
116-
},
117-
})
104+
const lspProcess = new ChildProcess(bin, args, { warnThresholds })
118105

119106
// this is a long running process, awaiting it will never resolve
120107
void lspProcess.run()

0 commit comments

Comments
 (0)