Output a warning if the command is not found.

pull/2639/head
maliming 5 years ago
parent 2f60a8470a
commit 65186e9a88

@ -32,6 +32,13 @@ namespace Volo.Abp.Cli.Commands
return Task.CompletedTask;
}
if (!AbpCliOptions.Commands.ContainsKey(commandLineArgs.Target))
{
Logger.LogWarning($"There is no command named {commandLineArgs.Target}.");
Logger.LogInformation(GetUsageInfo());
return Task.CompletedTask;
}
var commandType = AbpCliOptions.Commands[commandLineArgs.Target];
using (var scope = ServiceScopeFactory.CreateScope())

Loading…
Cancel
Save