File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 > {
You can’t perform that action at this time.
0 commit comments