entc/internal: catch syntax error due to conflict marker (#1163)

This commit is contained in:
BrentChesny
2021-01-12 17:22:48 +01:00
committed by GitHub
parent 13b61ff455
commit ab9b2ae967

View File

@@ -218,7 +218,13 @@ func IsBuildError(err error) bool {
if strings.HasPrefix(err.Error(), "entc/load: #") {
return true
}
for _, s := range []string{"syntax error", "previous declaration", "invalid character", "could not import"} {
for _, s := range []string{
"syntax error",
"previous declaration",
"invalid character",
"could not import",
"found '<<'",
} {
if strings.Contains(err.Error(), s) {
return true
}