Skip to content

Commit

Permalink
fixes #74130
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed May 28, 2019
1 parent edd560d commit b81b3cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/platform/environment/node/environmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
Expand Down Expand Up @@ -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');
}
Expand Down Expand Up @@ -170,6 +173,7 @@ export class EnvironmentService implements IEnvironmentService {
}

const vscodePortable = process.env['VSCODE_PORTABLE'];

if (vscodePortable) {
return path.join(vscodePortable, 'extensions');
}
Expand Down

0 comments on commit b81b3cd

Please sign in to comment.