Skip to content

Commit 4afef84

Browse files
authored
End successfully after aspire compose. (#7002)
1 parent d9517b1 commit 4afef84

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/HotChocolate/Fusion/src/Aspire.Analyzers/ConfigurationGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ private static void Execute(
299299

300300
writer.WriteLine();
301301
writer.WriteIndentedLine("global::HotChocolate.Fusion.Composition.FusionGatewayConfigurationUtilities.ConfigureAsync(gateways).Wait();");
302+
writer.WriteIndentedLine("Environment.Exit(0);");
302303
}
303304

304305
writer.WriteIndentedLine("}");

src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/HotChocolate/Fusion/src/Aspire.Analyzers/Properties/AnalyzerResources.resx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ namespace Aspire.Hosting
2727
{
2828
public static DistributedApplication Compose(this DistributedApplication application)
2929
{
30+
var options = application.Services.GetRequiredService<DistributedApplicationOptions>();
31+
32+
if (options.Args is ["compose"])
33+
{
34+
Environment.Exit(0);
35+
}
36+
3037
return application;
3138
}
3239
}

0 commit comments

Comments
 (0)