Revert "Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)" (#5983)

This reverts commit d15a3fcc98.
This commit is contained in:
Karl Burtram
2019-06-11 12:35:58 -07:00
committed by GitHub
parent 95a50b7892
commit 5a7562a37b
926 changed files with 11394 additions and 19540 deletions

View File

@@ -8,7 +8,7 @@ import * as os from 'os';
import { localize } from 'vs/nls';
import { ParsedArgs } from 'vs/platform/environment/common/environment';
import { join } from 'vs/base/common/path';
import { writeFileSync } from 'vs/base/node/pfs';
import { writeFileSync } from 'fs';
/**
* This code is also used by standalone cli's. Avoid adding any other dependencies.
@@ -54,6 +54,7 @@ export const options: Option[] = [
{ id: 'verbose', type: 'boolean', cat: 't', description: localize('verbose', "Print verbose output (implies --wait).") },
{ id: 'log', type: 'string', cat: 't', args: 'level', description: localize('log', "Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.") },
{ id: 'status', type: 'boolean', alias: 's', cat: 't', description: localize('status', "Print process usage and diagnostics information.") },
{ id: 'prof-modules', type: 'boolean', alias: 'p', cat: 't', description: localize('prof-modules', "Capture performance markers while loading JS modules and print them with 'F1 > Developer: Startup Performance") },
{ id: 'prof-startup', type: 'boolean', cat: 't', description: localize('prof-startup', "Run CPU profiler during startup") },
{ id: 'disable-extensions', type: 'boolean', deprecates: 'disableExtensions', cat: 't', description: localize('disableExtensions', "Disable all installed extensions.") },
{ id: 'disable-extension', type: 'string', cat: 't', args: 'extension-id', description: localize('disableExtension', "Disable an extension.") },

View File

@@ -21,9 +21,7 @@ import { URI } from 'vs/base/common/uri';
const xdgRuntimeDir = process.env['XDG_RUNTIME_DIR'];
function getNixIPCHandle(userDataPath: string, type: string): string {
const vscodePortable = process.env['VSCODE_PORTABLE'];
if (xdgRuntimeDir && !vscodePortable) {
if (xdgRuntimeDir) {
const scope = crypto.createHash('md5').update(userDataPath).digest('hex').substr(0, 8);
return path.join(xdgRuntimeDir, `vscode-${scope}-${pkg.version}-${type}.sock`);
}
@@ -95,7 +93,6 @@ export class EnvironmentService implements IEnvironmentService {
@memoize
get userDataPath(): string {
const vscodePortable = process.env['VSCODE_PORTABLE'];
if (vscodePortable) {
return path.join(vscodePortable, 'user-data');
}
@@ -111,7 +108,7 @@ export class EnvironmentService implements IEnvironmentService {
get appSettingsHome(): string { return path.join(this.userDataPath, 'User'); }
@memoize
get settingsResource(): URI { return URI.file(path.join(this.appSettingsHome, 'settings.json')); }
get appSettingsPath(): string { return path.join(this.appSettingsHome, 'settings.json'); }
@memoize
get machineSettingsHome(): string { return path.join(this.userDataPath, 'Machine'); }
@@ -173,7 +170,6 @@ export class EnvironmentService implements IEnvironmentService {
}
const vscodePortable = process.env['VSCODE_PORTABLE'];
if (vscodePortable) {
return path.join(vscodePortable, 'extensions');
}
@@ -293,7 +289,6 @@ export function parseDebugPort(debugArg: string | undefined, debugBrkArg: string
const portStr = debugBrkArg || debugArg;
const port = Number(portStr) || (!isBuild ? defaultBuildPort : null);
const brk = port ? Boolean(!!debugBrkArg) : false;
return { port, break: brk, debugId };
}
@@ -308,9 +303,9 @@ function parsePathArg(arg: string | undefined, process: NodeJS.Process): string
if (path.normalize(arg) === resolved) {
return resolved;
} else {
return path.resolve(process.env['VSCODE_CWD'] || process.cwd(), arg);
}
return path.resolve(process.env['VSCODE_CWD'] || process.cwd(), arg);
}
export function parseUserDataDir(args: ParsedArgs, process: NodeJS.Process): string {