fix: more robust <app> autocomplete + error handling
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See toolshed/organising#652
This commit is contained in:
@ -52,8 +52,8 @@ Please note, "upgrade"/"rollback" do not support chaos operations.`,
|
||||
case 1:
|
||||
app, err := appPkg.Get(args[0])
|
||||
if err != nil {
|
||||
log.Debugf("autocomplete failed: %s", err)
|
||||
return nil, cobra.ShellCompDirectiveDefault
|
||||
errMsg := fmt.Sprintf("autocomplete failed: %s", err)
|
||||
return []string{errMsg}, cobra.ShellCompDirectiveError
|
||||
}
|
||||
return autocomplete.RecipeVersionComplete(app.Recipe.Name)
|
||||
default:
|
||||
|
Reference in New Issue
Block a user