Skip to content

Commit ba5425c

Browse files
committed
Fix legacy mention of InvocationContext in error message for GetParseResult methods
1 parent 13f6b87 commit ba5425c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/System.CommandLine.Hosting/HostingExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static ParseResult GetParseResult(this IHostBuilder hostBuilder)
6363
ctxObj is ParseResult invocationContext)
6464
return invocationContext;
6565

66-
throw new InvalidOperationException("Host builder has no Invocation Context registered to it.");
66+
throw new InvalidOperationException("Host builder has no command-line parse result registered to it.");
6767
}
6868

6969
public static ParseResult GetParseResult(this HostBuilderContext context)
@@ -74,7 +74,7 @@ public static ParseResult GetParseResult(this HostBuilderContext context)
7474
ctxObj is ParseResult invocationContext)
7575
return invocationContext;
7676

77-
throw new InvalidOperationException("Host builder has no Invocation Context registered to it.");
77+
throw new InvalidOperationException("Host builder context has no command-line parse result registered to it.");
7878
}
7979

8080
public static IHost GetHost(this ParseResult parseResult)

0 commit comments

Comments
 (0)