fix: remove comparison from old error message to new

Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
This commit is contained in:
Jesse Simpson
2024-12-23 16:33:03 -05:00
parent c481470985
commit d8bec4e30f

View File

@@ -437,8 +437,12 @@ func cleanupExecError(filename string, err error) error {
}
finalErrorString = finalErrorString + fileLocation.String()
}
if strings.TrimSpace(finalErrorString) == "" {
// Fallback to original error message if nothing was extracted
return fmt.Errorf("%s", err.Error())
}
return fmt.Errorf("NEW ERROR FORMAT: \n%s\n\n\nORIGINAL ERROR:\n%s", finalErrorString, err.Error())
return fmt.Errorf("%s", finalErrorString)
}
func sortTemplates(tpls map[string]renderable) []string {