mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 09:11:45 +00:00
provenance: add missing provenance check for typed nil
The previous check only checks for untyped nil, however, it's possible for the provenance capture to be a typed nil as well, so we need to check for this scenario as well. Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@@ -476,6 +476,10 @@ func getRefProvenance(ref solver.ResultProxy, br *provenanceBridge) (*provenance
|
||||
}
|
||||
|
||||
if br.req != nil {
|
||||
if pr == nil {
|
||||
return nil, errors.Errorf("missing provenance for %s", ref.ID())
|
||||
}
|
||||
|
||||
pr.Frontend = br.req.Frontend
|
||||
pr.Args = provenance.FilterArgs(br.req.FrontendOpt)
|
||||
// TODO: should also save some output options like compression
|
||||
|
||||
Reference in New Issue
Block a user