diff --git a/src/client/application/diagnostics/promptHandler.ts b/src/client/application/diagnostics/promptHandler.ts index 25b946b2ffb5..047c4797fc60 100644 --- a/src/client/application/diagnostics/promptHandler.ts +++ b/src/client/application/diagnostics/promptHandler.ts @@ -54,7 +54,7 @@ export class DiagnosticCommandPromptHandlerService implements IDiagnosticHandler ): Promise { switch (severity) { case DiagnosticSeverity.Error: { - return this.appShell.showErrorMessage(message, ...prompts); + return this.appShell.showErrorMessage(message, { modal: true }, ...prompts); } case DiagnosticSeverity.Warning: { return this.appShell.showWarningMessage(message, ...prompts); diff --git a/src/test/application/diagnostics/promptHandler.unit.test.ts b/src/test/application/diagnostics/promptHandler.unit.test.ts index 0c8d732b15f4..165527394a3b 100644 --- a/src/test/application/diagnostics/promptHandler.unit.test.ts +++ b/src/test/application/diagnostics/promptHandler.unit.test.ts @@ -47,7 +47,12 @@ suite('Application Diagnostics - PromptHandler', () => { switch (severity.value) { case DiagnosticSeverity.Error: { appShell - .setup((a) => a.showErrorMessage(typemoq.It.isValue(diagnostic.message))) + .setup((a) => + a.showErrorMessage( + typemoq.It.isValue(diagnostic.message), + typemoq.It.isValue({ modal: true }), + ), + ) .verifiable(typemoq.Times.once()); break; } @@ -92,6 +97,7 @@ suite('Application Diagnostics - PromptHandler', () => { .setup((a) => a.showErrorMessage( typemoq.It.isValue(options.message!), + typemoq.It.isValue({ modal: true }), typemoq.It.isValue('Yes'), typemoq.It.isValue('No'), ), @@ -152,6 +158,7 @@ suite('Application Diagnostics - PromptHandler', () => { .setup((a) => a.showErrorMessage( typemoq.It.isValue(options.message!), + typemoq.It.isValue({ modal: true }), typemoq.It.isValue('Yes'), typemoq.It.isValue('No'), ), @@ -213,6 +220,7 @@ suite('Application Diagnostics - PromptHandler', () => { .setup((a) => a.showErrorMessage( typemoq.It.isValue(options.message!), + typemoq.It.isValue({ modal: true }), typemoq.It.isValue('Yes'), typemoq.It.isValue('No'), ),