Skip to content

Commit 3177bdc

Browse files
committed
todo: stop cli on aspire debug session end
1 parent adc7dcc commit 3177bdc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Aspire.Cli/Backchannel/ExtensionRpcTarget.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public void StopCli(string token)
2929
throw new AuthenticationException();
3030
}
3131

32+
// TODO
33+
//serviceProvider.GetRequiredService<IInteractionService>().DisplayCancellationMessage();
3234
Environment.Exit(0);
3335
}
3436

src/Aspire.Cli/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ private static void AddInteractionServices(HostApplicationBuilder builder)
191191

192192
if (extensionEndpoint is not null)
193193
{
194-
builder.Services.AddSingleton<ExtensionRpcTarget>();
195194
builder.Services.AddSingleton<IExtensionBackchannel, ExtensionBackchannel>();
196195

197196
var extensionPromptEnabled = builder.Configuration[KnownConfigNames.ExtensionPromptEnabled] is "true";
@@ -204,6 +203,8 @@ private static void AddInteractionServices(HostApplicationBuilder builder)
204203
extensionPromptEnabled);
205204
});
206205

206+
builder.Services.AddSingleton<ExtensionRpcTarget>();
207+
207208
// If the CLI is being launched from the aspire extension, we don't want to use the console logger that's used when including --debug.
208209
// Instead, we will log to the extension backchannel.
209210
builder.Logging.AddFilter("Aspire.Cli", LogLevel.Information);

0 commit comments

Comments
 (0)