Skip to content

Commit e3dc5a3

Browse files
author
Benjamin Pasero
committed
Startup error dialog closes immediately (fix microsoft#104493)
1 parent ef569d3 commit e3dc5a3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/vs/code/electron-main/main.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ class CodeMain {
289289

290290
// Process Info
291291
if (args.status) {
292-
return instantiationService.invokeFunction(async accessor => {
292+
return instantiationService.invokeFunction(async () => {
293+
293294
// Create a diagnostic service connected to the existing shared process
294295
const sharedProcessClient = await connect(environmentService.sharedIPCHandle, 'main');
295296
const diagnosticsChannel = sharedProcessClient.getChannel('diagnostics');
@@ -357,7 +358,10 @@ class CodeMain {
357358
}
358359

359360
private showStartupWarningDialog(message: string, detail: string): void {
360-
dialog.showMessageBox({
361+
// use sync variant here because we likely exit after this method
362+
// due to startup issues and otherwise the dialog seems to disappear
363+
// https://github.com/microsoft/vscode/issues/104493
364+
dialog.showMessageBoxSync({
361365
title: product.nameLong,
362366
type: 'warning',
363367
buttons: [mnemonicButtonLabel(localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))],

0 commit comments

Comments
 (0)