Startup error dialog closes immediately (fix #104493)

This commit is contained in:
Benjamin Pasero
2020-08-12 15:56:41 +02:00
parent ef569d3b9a
commit e3dc5a339c

View File

@@ -289,7 +289,8 @@ class CodeMain {
// Process Info
if (args.status) {
return instantiationService.invokeFunction(async accessor => {
return instantiationService.invokeFunction(async () => {
// Create a diagnostic service connected to the existing shared process
const sharedProcessClient = await connect(environmentService.sharedIPCHandle, 'main');
const diagnosticsChannel = sharedProcessClient.getChannel('diagnostics');
@@ -357,7 +358,10 @@ class CodeMain {
}
private showStartupWarningDialog(message: string, detail: string): void {
dialog.showMessageBox({
// use sync variant here because we likely exit after this method
// due to startup issues and otherwise the dialog seems to disappear
// https://github.com/microsoft/vscode/issues/104493
dialog.showMessageBoxSync({
title: product.nameLong,
type: 'warning',
buttons: [mnemonicButtonLabel(localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))],