Skip to content

Commit 5b4a95d

Browse files
committed
fix(amazonq): language server fails to start in non-debug mode
1 parent 2157f55 commit 5b4a95d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ export function createServerOptions({
3636
execArgv: string[]
3737
}) {
3838
return async () => {
39-
const debugArgs = isDebugInstance() ? '--inspect=6080' : ''
40-
const lspProcess = new ChildProcess(executable, [debugArgs, serverModule, ...execArgv])
39+
const args = [serverModule, ...execArgv]
40+
if (isDebugInstance()) {
41+
args.unshift('--inspect=6080')
42+
}
43+
const lspProcess = new ChildProcess(executable, args)
4144

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

0 commit comments

Comments
 (0)