show tx error if not accompanied by cadence error
@@ -116,9 +116,12 @@ func failureDeployment(err error, contractPathNames map[string]string) string {
for name, err := range deployErr.Contracts() {
// remove transaction error as it confuses developer, the only important part is the actual code
- removeDeployOuput := regexp.MustCompile(`(?s)(failed deploying.*contracts\.add[^\n]*\n[^\n]*\n)`)
+ removeDeployOuput := regexp.MustCompile(`(?s)(failed deploying.*contracts\.add[^\n]*\n[^\n]*\n\nerror: )`)
out.WriteString(output.Bold(fmt.Sprintf("%s Errors:\n", name)))
out.WriteString(output.Red(removeDeployOuput.ReplaceAllString(err.Error(), "")))
+
+ fmt.Println("----")
+ fmt.Println(err.Error())
}
return out.String()
}
