Skip to content

Commit e6c085c

Browse files
committed
fix: remove hardcoded path
1 parent a7e37a3 commit e6c085c

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

packages/amazonq/src/lsp/client.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function hasGlibcPatch(): Promise<boolean> {
6161
return false // Return false to ensure SageMaker doesn't try to use GLIBC patching
6262
}
6363

64-
// Check for environment variables first (for CDM)
64+
// Check for environment variables (for CDM)
6565
const glibcLinker = process.env.VSCODE_SERVER_CUSTOM_GLIBC_LINKER || ''
6666
const glibcPath = process.env.VSCODE_SERVER_CUSTOM_GLIBC_PATH || ''
6767

@@ -70,8 +70,8 @@ export async function hasGlibcPatch(): Promise<boolean> {
7070
return true
7171
}
7272

73-
// Fall back to file check for other environments
74-
return await fs.exists('/opt/vsc-sysroot/lib64/ld-linux-x86-64.so.2')
73+
// No environment variables, no patching needed
74+
return false
7575
}
7676

7777
export async function startLanguageServer(
@@ -110,16 +110,9 @@ export async function startLanguageServer(
110110
resourcePaths.node,
111111
]
112112
getLogger('amazonqLsp').info(`Patched node runtime with GLIBC using env vars to ${executable}`)
113-
}
114-
// Fall back to hardcoded path
115-
else {
116-
executable = [
117-
'/opt/vsc-sysroot/lib64/ld-linux-x86-64.so.2',
118-
'--library-path',
119-
'/opt/vsc-sysroot/lib64',
120-
resourcePaths.node,
121-
]
122-
getLogger('amazonqLsp').info(`Patched node runtime with GLIBC using hardcoded path to ${executable}`)
113+
} else {
114+
// No environment variables, use the node executable directly
115+
executable = [resourcePaths.node]
123116
}
124117
} else {
125118
executable = [resourcePaths.node]

0 commit comments

Comments
 (0)