Skip to content

Commit

Permalink
Merge pull request #694 from imjasonh/pc
Browse files Browse the repository at this point in the history
log and continue when .pc file can't be loaded
  • Loading branch information
imjasonh authored Sep 19, 2023
2 parents 5ba8539 + a5722a6 commit 4495533
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/build/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ func generatePkgConfigDeps(pc *PackageBuild, generated *config.Dependencies) err
return err
}

if !strings.Contains(path, ".pc") {
if !strings.HasSuffix(path, ".pc") {
return nil
}

Expand All @@ -614,7 +614,8 @@ func generatePkgConfigDeps(pc *PackageBuild, generated *config.Dependencies) err

pkg, err := pkgconfig.Load(filepath.Join(pc.WorkspaceSubdir(), path))
if err != nil {
return err
pc.Logger.Printf("WARNING: Unable to load .pc file (%s) using pkgconfig: %v", path, err)
return nil
}

pcName := filepath.Base(path)
Expand Down

0 comments on commit 4495533

Please sign in to comment.