Skip to content

Commit 63bfb44

Browse files
committed
Revert "dont read XDG_RUNTIME_DIR"
fixes microsoft#22593 This reverts commit 867e521.
1 parent 044255e commit 63bfb44

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

extensions/git/src/askpass.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/vs/code/node/shellEnv.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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);

src/vs/platform/environment/node/environmentService.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ import { memoize } from 'vs/base/common/decorators';
1515
import pkg from 'vs/platform/node/package';
1616
import 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+
1822
function 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

0 commit comments

Comments
 (0)