File tree Expand file tree Collapse file tree
platform/environment/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ function getIPCHandlePath(nonce: string): string {
2727 return `\\\\.\\pipe\\vscode-git-askpass-${ nonce } -sock` ;
2828 }
2929
30+ if ( process . env [ 'XDG_RUNTIME_DIR' ] ) {
31+ return path . join ( process . env [ 'XDG_RUNTIME_DIR' ] , `vscode-git-askpass-${ nonce } .sock` ) ;
32+ }
33+
3034 return path . join ( os . tmpdir ( ) , `vscode-git-askpass-${ nonce } .sock` ) ;
3135}
3236
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ function getUnixShellEnvironment(): TPromise<typeof process.env> {
5858 delete env [ 'ELECTRON_NO_ATTACH_CONSOLE' ] ;
5959 }
6060
61+ // https://github.com/Microsoft/vscode/issues/22593#issuecomment-336050758
62+ delete env [ 'XDG_RUNTIME_DIR' ] ;
63+
6164 c ( env ) ;
6265 } catch ( err ) {
6366 e ( err ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,15 @@ import { memoize } from 'vs/base/common/decorators';
1515import pkg from 'vs/platform/node/package' ;
1616import product from 'vs/platform/node/product' ;
1717
18+ // Read this before there's any chance it is overwritten
19+ // Related to https://github.com/Microsoft/vscode/issues/30624
20+ const xdgRuntimeDir = process . env [ 'XDG_RUNTIME_DIR' ] ;
21+
1822function getNixIPCHandle ( userDataPath : string , type : string ) : string {
23+ if ( xdgRuntimeDir ) {
24+ return path . join ( xdgRuntimeDir , `${ pkg . name } -${ pkg . version } -${ type } .sock` ) ;
25+ }
26+
1927 return path . join ( userDataPath , `${ pkg . version } -${ type } .sock` ) ;
2028}
2129
You can’t perform that action at this time.
0 commit comments