Skip to content

Commit 1bfac67

Browse files
fix
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 2fd9a50 commit 1bfac67

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

code/src/vs/server/node/remoteTerminalChannel.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,20 @@ export class RemoteTerminalChannel extends Disposable implements IServerChannel<
328328
}
329329

330330
private _getEnvironment(): platform.IProcessEnvironment {
331-
return { ...process.env };
331+
const env: platform.IProcessEnvironment = { ...process.env };
332+
if (process.env['CHECODE_STRIP_LD_LIBRARY_PATH_FOR_SHELL_ENV'] === '1') {
333+
const filtered = (env['LD_LIBRARY_PATH'] || '')
334+
.split(':')
335+
.map(entry => entry.trim())
336+
.filter(entry => !!entry && entry !== '/checode/checode-linux-libc/ubi8/ld_libs' && entry !== '/checode/checode-linux-libc/ubi9/ld_libs' && entry !== '/checode/checode-linux-musl/ld_libs')
337+
.join(':');
338+
if (filtered) {
339+
env['LD_LIBRARY_PATH'] = filtered;
340+
} else {
341+
delete env['LD_LIBRARY_PATH'];
342+
}
343+
}
344+
return env;
332345
}
333346

334347
private _getWslPath(original: string, direction: 'unix-to-win' | 'win-to-unix'): Promise<string> {

0 commit comments

Comments
 (0)