mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-16 20:23:20 +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.RegisterInstance(typeof(CommandModel), model);
|
||||||
_registrar.RegisterDependencies(model);
|
_registrar.RegisterDependencies(model);
|
||||||
|
|
||||||
// No default command?
|
|
||||||
if (model.DefaultCommand == null)
|
|
||||||
{
|
|
||||||
// Got at least one argument?
|
// Got at least one argument?
|
||||||
var firstArgument = arguments.FirstOrDefault();
|
var firstArgument = arguments.FirstOrDefault();
|
||||||
if (firstArgument != null)
|
if (firstArgument != null)
|
||||||
@ -49,7 +46,6 @@ internal sealed class CommandExecutor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Parse and map the model against the arguments.
|
// Parse and map the model against the arguments.
|
||||||
var parsedResult = ParseCommandLineArguments(model, configuration.Settings, arguments);
|
var parsedResult = ParseCommandLineArguments(model, configuration.Settings, arguments);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user