mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Revert "dont read XDG_RUNTIME_DIR"
fixes #22593
This reverts commit 867e521341.
This commit is contained in:
@@ -27,6 +27,10 @@ function getIPCHandlePath(nonce: string): string {
|
|||||||
return `\\\\.\\pipe\\vscode-git-askpass-${nonce}-sock`;
|
return `\\\\.\\pipe\\vscode-git-askpass-${nonce}-sock`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env['XDG_RUNTIME_DIR']) {
|
||||||
|
return path.join(process.env['XDG_RUNTIME_DIR'], `vscode-git-askpass-${nonce}.sock`);
|
||||||
|
}
|
||||||
|
|
||||||
return path.join(os.tmpdir(), `vscode-git-askpass-${nonce}.sock`);
|
return path.join(os.tmpdir(), `vscode-git-askpass-${nonce}.sock`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ function getUnixShellEnvironment(): TPromise<typeof process.env> {
|
|||||||
delete env['ELECTRON_NO_ATTACH_CONSOLE'];
|
delete env['ELECTRON_NO_ATTACH_CONSOLE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/Microsoft/vscode/issues/22593#issuecomment-336050758
|
||||||
|
delete env['XDG_RUNTIME_DIR'];
|
||||||
|
|
||||||
c(env);
|
c(env);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
e(err);
|
e(err);
|
||||||
|
|||||||
@@ -15,7 +15,15 @@ import { memoize } from 'vs/base/common/decorators';
|
|||||||
import pkg from 'vs/platform/node/package';
|
import pkg from 'vs/platform/node/package';
|
||||||
import product from 'vs/platform/node/product';
|
import product from 'vs/platform/node/product';
|
||||||
|
|
||||||
|
// Read this before there's any chance it is overwritten
|
||||||
|
// Related to https://github.com/Microsoft/vscode/issues/30624
|
||||||
|
const xdgRuntimeDir = process.env['XDG_RUNTIME_DIR'];
|
||||||
|
|
||||||
function getNixIPCHandle(userDataPath: string, type: string): string {
|
function getNixIPCHandle(userDataPath: string, type: string): string {
|
||||||
|
if (xdgRuntimeDir) {
|
||||||
|
return path.join(xdgRuntimeDir, `${pkg.name}-${pkg.version}-${type}.sock`);
|
||||||
|
}
|
||||||
|
|
||||||
return path.join(userDataPath, `${pkg.version}-${type}.sock`);
|
return path.join(userDataPath, `${pkg.version}-${type}.sock`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user