From 5b4a95d62879e0f564500bac75a26be4f22aea3f Mon Sep 17 00:00:00 2001 From: Josh Pinkney Date: Mon, 10 Feb 2025 05:56:38 -0500 Subject: [PATCH] fix(amazonq): language server fails to start in non-debug mode --- packages/core/src/shared/lsp/utils/platform.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/src/shared/lsp/utils/platform.ts b/packages/core/src/shared/lsp/utils/platform.ts index 44e68c423d2..4d242c3833e 100644 --- a/packages/core/src/shared/lsp/utils/platform.ts +++ b/packages/core/src/shared/lsp/utils/platform.ts @@ -36,8 +36,11 @@ export function createServerOptions({ execArgv: string[] }) { return async () => { - const debugArgs = isDebugInstance() ? '--inspect=6080' : '' - const lspProcess = new ChildProcess(executable, [debugArgs, serverModule, ...execArgv]) + const args = [serverModule, ...execArgv] + if (isDebugInstance()) { + args.unshift('--inspect=6080') + } + const lspProcess = new ChildProcess(executable, args) // this is a long running process, awaiting it will never resolve void lspProcess.run()