You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can not register a Custom HelpProvider when using Microsoft.Extensions.DependencyInjection & Spectre.Console.Cli.Extensions.DependencyInjection. The default HelpProvider is used in stead of
the custom help provider.
My guess is, that the following line is overriding the HelpProvider.
and modified the test Should_Output_Custom_Help_When_Registered_By_Instance to use
[Fact][Expectation("Custom_Help_Registered_By_Instance")]publicTaskShould_Output_Custom_Help_When_Registered_By_Instance(){varservices=newServiceCollection();varregistrar=newDependencyInjectionRegistrar(services);// Givenvarfixture=newCommandAppTester(registrar);fixture.Configure(configurator =>{// Create the custom help providervarhelpProvider=newCustomHelpProvider(configurator.Settings,"1.0");// Register the custom help provider instanceregistrar.RegisterInstance(typeof(IHelpProvider),helpProvider);configurator.SetApplicationName("myapp");configurator.AddCommand<DogCommand>("dog");});// Whenvarresult=fixture.Run();// ThenreturnVerifier.Verify(result.Output);}
Expected behavior
Custom HelpProvider should be used.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Information
Describe the bug
Can not register a Custom HelpProvider when using Microsoft.Extensions.DependencyInjection & Spectre.Console.Cli.Extensions.DependencyInjection. The default HelpProvider is used in stead of
the custom help provider.
My guess is, that the following line is overriding the HelpProvider.
spectre.console/src/Spectre.Console.Cli/Internal/CommandExecutor.cs
Line 27 in 131b37f
To Reproduce
Steps to reproduce the behavior.
I installed these two nuget packages:
and modified the test Should_Output_Custom_Help_When_Registered_By_Instance to use
Expected behavior
Custom HelpProvider should be used.
Screenshots

If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: