From ab9b2ae967c29438830547a24b6bd793617f04e5 Mon Sep 17 00:00:00 2001 From: BrentChesny Date: Tue, 12 Jan 2021 17:22:48 +0100 Subject: [PATCH] entc/internal: catch syntax error due to conflict marker (#1163) --- entc/internal/snapshot.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entc/internal/snapshot.go b/entc/internal/snapshot.go index f5866bb88..c2fe6e47c 100644 --- a/entc/internal/snapshot.go +++ b/entc/internal/snapshot.go @@ -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 }