提交 3eda4250 编写于 作者: B Benjamin Pasero

code-ps: rename renderer => window and change cli to "-s, --status" (for #39262)

上级 ec0250d2
......@@ -75,7 +75,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
return 'shared-process';
}
return `renderer`;
return `window`;
}
return matches[1];
}
......
......@@ -37,7 +37,7 @@ export function printDiagnostics(info: IMainProcessInfo): Promise<any> {
return;
}
console.log(`| Renderer (${window.title})`);
console.log(`| Window (${window.title})`);
window.folders.forEach(folder => {
console.log(`| Folder (${basename(folder)})`);
......@@ -156,7 +156,7 @@ function formatProcessItem(mapPidToWindowTitle: Map<number, string>, output: str
} else {
name = `${repeat(' ', indent)} ${item.name}`;
if (item.name === 'renderer') {
if (item.name === 'window') {
name = `${name} (${mapPidToWindowTitle.get(item.pid)})`;
}
}
......
......@@ -102,9 +102,9 @@ function setupIPC(accessor: ServicesAccessor): TPromise<Server> {
app.dock.show(); // dock might be hidden at this case due to a retry
}
// Print --ps usage info
if (environmentService.args.ps) {
console.log('Warning: The --ps argument can only be used if Code is already running. Please run it again after Code has started.');
// Print --status usage info
if (environmentService.args.status) {
console.log('Warning: The --status argument can only be used if Code is already running. Please run it again after Code has started.');
}
return server;
......@@ -147,7 +147,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise<Server> {
const service = new LaunchChannelClient(channel);
// Process Info
if (environmentService.args.ps) {
if (environmentService.args.status) {
return service.getMainProcessInfo().then(info => {
return printDiagnostics(info).then(() => TPromise.wrapError(new ExpectedError()));
});
......
......@@ -65,7 +65,7 @@ export async function main(argv: string[]): TPromise<any> {
let processCallbacks: ((child: ChildProcess) => Thenable<any>)[] = [];
const verbose = args.verbose || args.ps;
const verbose = args.verbose || args.status;
if (verbose) {
env['ELECTRON_ENABLE_LOGGING'] = '1';
......
......@@ -10,6 +10,7 @@ export interface ParsedArgs {
_: string[];
help?: boolean;
version?: boolean;
status?: boolean;
wait?: boolean;
waitMarkerFilePath?: string;
diff?: boolean;
......@@ -48,7 +49,6 @@ export interface ParsedArgs {
'disable-updates'?: string;
'disable-crash-reporter'?: string;
'skip-add-to-recently-opened'?: boolean;
'ps'?: boolean;
}
export const IEnvironmentService = createDecorator<IEnvironmentService>('environmentService');
......
......@@ -53,7 +53,7 @@ const options: minimist.Opts = {
'disable-updates',
'disable-crash-reporter',
'skip-add-to-recently-opened',
'ps'
'status'
],
alias: {
add: 'a',
......@@ -62,6 +62,7 @@ const options: minimist.Opts = {
wait: 'w',
diff: 'd',
goto: 'g',
status: 's',
'new-window': 'n',
'reuse-window': 'r',
performance: 'p',
......@@ -147,7 +148,7 @@ export const optionsHelp: { [name: string]: string; } = {
'--enable-proposed-api <extension-id>': localize('experimentalApis', "Enables proposed api features for an extension."),
'--disable-extensions': localize('disableExtensions', "Disable all installed extensions."),
'--disable-gpu': localize('disableGPU', "Disable GPU hardware acceleration."),
'--ps': localize('ps', "Print process usage and diagnostics information."),
'-s, --status': localize('status', "Print process usage and diagnostics information."),
'-v, --version': localize('version', "Print version."),
'-h, --help': localize('help', "Print usage.")
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册