Skip to content

Commit 4021dbc

Browse files
committed
Only skip interaction service prompt if service not available
1 parent 797e82e commit 4021dbc

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/Aspire.Hosting/Dcp/DcpHost.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ internal async Task EnsureDevelopmentCertificateTrustAsync(CancellationToken can
142142

143143
try
144144
{
145-
// Check if the interaction service is available (dashboard enabled)
146-
if (!_interactionService.IsAvailable)
147-
{
148-
return;
149-
}
150-
151145
// Check and warn if the developer certificate is not trusted
152146
if (_developerCertificateService.TrustCertificate && _developerCertificateService.Certificates.Count > 0 && !await DeveloperCertificateService.IsCertificateTrustedAsync(_fileSystemService, _developerCertificateService.Certificates.First(), cancellationToken).ConfigureAwait(false))
153147
{
@@ -163,6 +157,12 @@ internal async Task EnsureDevelopmentCertificateTrustAsync(CancellationToken can
163157

164158
_logger.LogWarning("{Message}", message);
165159

160+
// Check if the interaction service is available (dashboard enabled)
161+
if (!_interactionService.IsAvailable)
162+
{
163+
return;
164+
}
165+
166166
// Send notification to the dashboard
167167
_ = _interactionService.PromptNotificationAsync(
168168
title: title,

0 commit comments

Comments
 (0)