This commit is contained in:
Joao Moreno 2019-05-28 10:33:59 +02:00
parent edd560d278
commit b81b3cd58e

View file

@ -21,7 +21,9 @@ import { URI } from 'vs/base/common/uri';
const xdgRuntimeDir = process.env['XDG_RUNTIME_DIR'];
function getNixIPCHandle(userDataPath: string, type: string): string {
if (xdgRuntimeDir) {
const vscodePortable = process.env['VSCODE_PORTABLE'];
if (xdgRuntimeDir && !vscodePortable) {
const scope = crypto.createHash('md5').update(userDataPath).digest('hex').substr(0, 8);
return path.join(xdgRuntimeDir, `vscode-${scope}-${pkg.version}-${type}.sock`);
}
@ -93,6 +95,7 @@ export class EnvironmentService implements IEnvironmentService {
@memoize
get userDataPath(): string {
const vscodePortable = process.env['VSCODE_PORTABLE'];
if (vscodePortable) {
return path.join(vscodePortable, 'user-data');
}
@ -170,6 +173,7 @@ export class EnvironmentService implements IEnvironmentService {
}
const vscodePortable = process.env['VSCODE_PORTABLE'];
if (vscodePortable) {
return path.join(vscodePortable, 'extensions');
}