fixed:移除无效的命令行工具中telemetry命令.

This commit is contained in:
chriswang521 2024-06-21 13:43:10 +08:00 committed by wangpenglong
parent 57fb93891d
commit f91148fb89
5 changed files with 9 additions and 9 deletions

View File

@ -32,8 +32,8 @@ function shouldSpawnCliProcess(argv: NativeParsedArgs): boolean {
|| !!argv['list-extensions']
|| !!argv['install-extension']
|| !!argv['uninstall-extension']
|| !!argv['locate-extension']
|| !!argv['telemetry'];
|| !!argv['locate-extension'];
// || !!argv['telemetry'];
}
interface IMainCli {

View File

@ -54,7 +54,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { ITelemetryServiceConfig, TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
import { supportsTelemetry, NullTelemetryService, getPiiPathsFromEnvironment, isInternalTelemetry, ITelemetryAppender } from 'vs/platform/telemetry/common/telemetryUtils';
import { OneDataSystemAppender } from 'vs/platform/telemetry/node/1dsAppender';
import { buildTelemetryMessage } from 'vs/platform/telemetry/node/telemetry';
// import { buildTelemetryMessage } from 'vs/platform/telemetry/node/telemetry';
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService';
import { IUserDataProfile, IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile';
@ -289,9 +289,9 @@ class CliMain extends Disposable {
}
// Telemetry
else if (this.argv['telemetry']) {
console.log(await buildTelemetryMessage(environmentService.appRoot, environmentService.extensionsPath));
}
// else if (this.argv['telemetry']) {
// console.log(await buildTelemetryMessage(environmentService.appRoot, environmentService.extensionsPath));
// }
}
private asExtensionIdOrVSIX(inputs: string[]): (string | URI)[] {

View File

@ -29,7 +29,7 @@ export interface NativeParsedArgs {
_urls?: string[];
help?: boolean;
version?: boolean;
telemetry?: boolean;
// telemetry?: boolean;
status?: boolean;
wait?: boolean;
waitMarkerFilePath?: string;

View File

@ -122,7 +122,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
'disable-gpu': { type: 'boolean', cat: 't', description: localize('disableGPU', "Disable GPU hardware acceleration.") },
'disable-chromium-sandbox': { type: 'boolean', cat: 't', description: localize('disableChromiumSandbox', "Use this option only when there is requirement to launch the application as sudo user on Linux or when running as an elevated user in an applocker environment on Windows.") },
'ms-enable-electron-run-as-node': { type: 'boolean', global: true },
'telemetry': { type: 'boolean', cat: 't', description: localize('telemetry', "Shows all telemetry events which VS code collects.") },
// 'telemetry': { type: 'boolean', cat: 't', description: localize('telemetry', "Shows all telemetry events which VS code collects.") },
'remote': { type: 'string', allowEmptyValue: true },
'folder-uri': { type: 'string[]', cat: 'o', args: 'uri' },

View File

@ -44,7 +44,7 @@ const isSupportedForCmd = (optionId: keyof RemoteParsedArgs) => {
case 'enable-smoke-test-driver':
case 'extensions-download-dir':
case 'builtin-extensions-dir':
case 'telemetry':
// case 'telemetry':
return false;
default:
return true;