Skip to content

Commit 20cfba0

Browse files
committed
Compilation database: Do not give up after failing detection of libraries
1 parent 6e375d8 commit 20cfba0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: legacy/builder/container_find_includes.go

+9
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ import (
110110
type ContainerFindIncludes struct{}
111111

112112
func (s *ContainerFindIncludes) Run(ctx *types.Context) error {
113+
err := s.findIncludes(ctx)
114+
if err != nil && ctx.OnlyUpdateCompilationDatabase {
115+
ctx.GetLogger().Println("info", "%s: %s", tr("An error occurred detecting libraries"), tr("the compilation database may be incomplete or inaccurate"))
116+
return nil
117+
}
118+
return err
119+
}
120+
121+
func (s *ContainerFindIncludes) findIncludes(ctx *types.Context) error {
113122
cachePath := ctx.BuildPath.Join("includes.cache")
114123
cache := readCache(cachePath)
115124

0 commit comments

Comments
 (0)