BUG QE induced tweaks to recent new-app CRD error message
@@ -1020,11 +1020,7 @@ func TransformRunError(err error, baseName, commandName, commandPath string, gro
groups.Add("", "", "", UsageError(commandPath, newAppNoInput, baseName, commandName))
default:
if runtime.IsNotRegisteredError(err) {
- useProcessMsg := fmt.Sprintf("The template contained an object type unknown to `oc new-app`. Use `oc process | oc create` instead. Error details: %v", err)
- if len(config.ComponentInputs.TemplateFiles) > 0 {
- useProcessMsg = fmt.Sprintf("The template contained an object type unknown to `oc new-app`. Use `oc process -f %s | oc create -f -` instead. Error details: %v", config.ComponentInputs.TemplateFiles[0], err)
- }
- groups.Add("", "", "", fmt.Errorf(useProcessMsg))
+ groups.Add("", "", "", fmt.Errorf(fmt.Sprintf("The template contained an object type unknown to `oc new-app`. Use `oc process -f <template> | oc create -f -` instead. Error details: %v", err)))
} else {
groups.Add("", "", "", err)
}
