Skip to content

Commit 1e54bb2

Browse files
committed
Fixes microsoft#27452 Set version, commit in extra bag from the start
1 parent a1fd514 commit 1e54bb2

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@ export class CrashReporterService implements ICrashReporterService {
3535

3636
private startCrashReporter(): void {
3737

38-
// base options
38+
// base options with product info
3939
this.options = {
4040
companyName: product.crashReporter.companyName,
4141
productName: product.crashReporter.productName,
42-
submitURL: this.getSubmitURL()
42+
submitURL: this.getSubmitURL(),
43+
extra: {
44+
vscode_version: pkg.version,
45+
vscode_commit: product.commit
46+
}
4347
};
4448

45-
// mixin telemetry info and product info
49+
// mixin telemetry info
4650
this.telemetryService.getTelemetryInfo()
4751
.then(info => {
48-
assign(this.options, {
49-
extra: {
50-
vscode_sessionId: info.sessionId,
51-
vscode_version: pkg.version,
52-
vscode_commit: product.commit,
53-
vscode_machineId: info.machineId
54-
}
52+
assign(this.options.extra, {
53+
vscode_sessionId: info.sessionId,
54+
vscode_machineId: info.machineId
5555
});
5656

5757
// start crash reporter right here
@@ -81,12 +81,7 @@ export class CrashReporterService implements ICrashReporterService {
8181
// Experimental attempt on Mac only for now
8282
if (isMacintosh) {
8383
const childProcessOptions = clone(this.options);
84-
if (childProcessOptions.extra) {
85-
childProcessOptions.extra.processName = name;
86-
} else {
87-
childProcessOptions.extra = { processName: name };
88-
}
89-
84+
childProcessOptions.extra.processName = name;
9085
childProcessOptions.crashesDirectory = os.tmpdir();
9186
return childProcessOptions;
9287
}

0 commit comments

Comments
 (0)