Skip to content

Commit

Permalink
Merge pull request abpframework#2639 from abpframework/maliming/helpc…
Browse files Browse the repository at this point in the history
…ommand

Output a warning if the command is not found.
  • Loading branch information
yekalkan authored Jan 15, 2020
2 parents 95198a0 + 65186e9 commit 6c252a2
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public Task ExecuteAsync(CommandLineArgs commandLineArgs)
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())
Expand Down

0 comments on commit 6c252a2

Please sign in to comment.