A few follow-up conflict resolutions

This commit is contained in:
2022-05-07 14:43:15 -04:00
parent 3d67b75be7
commit 63b1a7deee
4 changed files with 6 additions and 2 deletions

2
app.go
View File

@@ -391,7 +391,7 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
}
_, _ = fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error())
if a.Suggest {
if suggestion, err := a.suggestFlagFromError(err, context.Command.Name); err == nil {
if suggestion, err := a.suggestFlagFromError(err, cCtx.Command.Name); err == nil {
fmt.Fprintf(a.Writer, suggestion)
}
}