mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-16 12:13:22 +08:00
Display the application version (if set) when a version flag is the first argument, even if a default command has been set.
This commit is contained in:
parent
17c7a4f7d6
commit
dfdd129dd0
@ -29,9 +29,6 @@ internal sealed class CommandExecutor
|
||||
_registrar.RegisterInstance(typeof(CommandModel), model);
|
||||
_registrar.RegisterDependencies(model);
|
||||
|
||||
// No default command?
|
||||
if (model.DefaultCommand == null)
|
||||
{
|
||||
// Got at least one argument?
|
||||
var firstArgument = arguments.FirstOrDefault();
|
||||
if (firstArgument != null)
|
||||
@ -49,7 +46,6 @@ internal sealed class CommandExecutor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Parse and map the model against the arguments.
|
||||
var parsedResult = ParseCommandLineArguments(model, configuration.Settings, arguments);
|
||||
|
Loading…
x
Reference in New Issue
Block a user