Send extension host exit code

This commit is contained in:
Alex Dima
2019-03-20 16:53:41 +01:00
parent 2975db6be9
commit 499686ca03
5 changed files with 19 additions and 2 deletions

View File

@@ -640,7 +640,14 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
private _gracefulExit(code: number): void {
// to give the PH process a chance to flush any outstanding console
// messages to the main process, we delay the exit() by some time
setTimeout(() => this._nativeExit(code), 500);
setTimeout(() => {
if (!!this._initData.environment.extensionTestsLocationURI) {
// If extension tests are running, give the exit code to the renderer
this._mainThreadExtensionsProxy.$onExtensionHostExit(code);
return;
}
this._nativeExit(code);
}, 500);
}
private _startExtensionHost(): Promise<void> {