From 169095f673b6e4f0e544531623a627fe952a57bd Mon Sep 17 00:00:00 2001 From: Cristian Cepeda <43882+pastuxso@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:20:03 -0500 Subject: [PATCH] Returning error --- pkg/project/project.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/project/project.go b/pkg/project/project.go index 95582327d..5684ff463 100644 --- a/pkg/project/project.go +++ b/pkg/project/project.go @@ -376,7 +376,7 @@ func (p *Project) loadFromDirectory( if !ignored { p.logger.Warn("path error", zap.String("path", path), zap.Error(err)) } - ignored = true + return err default: return err } @@ -403,7 +403,10 @@ func (p *Project) loadFromDirectory( return nil }) - if err != nil { + + switch err.(type) { + case nil, *os.PathError: + default: p.send(ctx, eventc, LoadEvent{ Type: LoadEventError, Data: LoadEventErrorData{Err: err},