diff --git a/server_apps.go b/server_apps.go index bd702c1a20043cce64c73b583959c53a0d07209e..4ff8e0b217368a62fe12aa5b872d69318e76fed8 100644 --- a/server_apps.go +++ b/server_apps.go @@ -343,6 +343,7 @@ func (s *server) getAppInfo(ctx context.Context, pathInRepo, repo string) (*appI highestVer := 0 highsetVerNil := true firstTime := make(map[int]*appInfo) + var firstErr error = nil for { info, err := s.parseAppToml(ctx, pathInRepo, obj) if err == nil { @@ -354,6 +355,9 @@ func (s *server) getAppInfo(ctx context.Context, pathInRepo, repo string) (*appI } } else { log.Printf("%s@%s: %v", repo, obj.Hash.String(), err) + if firstErr == nil { + firstErr = err + } } if len(obj.ParentHashes) == 0 { break @@ -365,6 +369,9 @@ func (s *server) getAppInfo(ctx context.Context, pathInRepo, repo string) (*appI } if highsetVerNil { + if firstErr != nil { + return nil, firstErr + } return nil, fmt.Errorf("no `version` field in `flow3r.toml`") } stars, err := s.getStars(ctx, repo)