diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts index 0acfd1793ac..792a8672297 100644 --- a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -35,23 +35,23 @@ export class CrashReporterService implements ICrashReporterService { private startCrashReporter(): void { - // base options + // base options with product info this.options = { companyName: product.crashReporter.companyName, productName: product.crashReporter.productName, - submitURL: this.getSubmitURL() + submitURL: this.getSubmitURL(), + extra: { + vscode_version: pkg.version, + vscode_commit: product.commit + } }; - // mixin telemetry info and product info + // mixin telemetry info this.telemetryService.getTelemetryInfo() .then(info => { - assign(this.options, { - extra: { - vscode_sessionId: info.sessionId, - vscode_version: pkg.version, - vscode_commit: product.commit, - vscode_machineId: info.machineId - } + assign(this.options.extra, { + vscode_sessionId: info.sessionId, + vscode_machineId: info.machineId }); // start crash reporter right here @@ -81,12 +81,7 @@ export class CrashReporterService implements ICrashReporterService { // Experimental attempt on Mac only for now if (isMacintosh) { const childProcessOptions = clone(this.options); - if (childProcessOptions.extra) { - childProcessOptions.extra.processName = name; - } else { - childProcessOptions.extra = { processName: name }; - } - + childProcessOptions.extra.processName = name; childProcessOptions.crashesDirectory = os.tmpdir(); return childProcessOptions; }