-
-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--version not showing version when default command set #1216
Comments
FYI. I've nearly fixed this and will submit a PR soon (likely in the coming weeks). |
I don‘t think this bug has fixed. |
I'll take a look @my522cn, please be on hand if I need help reproducing it. |
Unfortunately it's still broken in 0.49.1 @my522cn Here is my command and application: using Spectre.Console;
using Spectre.Console.Cli;
public class EmptyCommand : Command<EmptyCommandSettings>
{
public override int Execute(CommandContext context, EmptyCommandSettings settings)
{
AnsiConsole.MarkupLine("Hello world");
return 0;
}
}
public static class Program
{
public static int Main(string[] args)
{
var app = new CommandApp();
app.SetDefaultCommand<EmptyCommand>();
app.Configure(config =>
{
config.SetApplicationVersion("1.0");
});
return app.Run(args);
}
} The default command is executed, not the version shown: Expected behavior |
0.49.0 |
Information
To Reproduce
SetDefaultCommand
mycmd --version
Expected behavior
Shows version instead of executing default command
Additional context
Seemingly caused by this check
The text was updated successfully, but these errors were encountered: