mirror of https://github.com/docker/buildx.git
Merge pull request #2754 from crazy-max/call-localstate
build: don't generate local state for subrequests
This commit is contained in:
commit
2bdf451b68
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
func saveLocalState(so *client.SolveOpt, target string, opts Options, node builder.Node, cfg *confutil.Config) error {
|
||||
var err error
|
||||
if so.Ref == "" {
|
||||
if so.Ref == "" || opts.CallFunc != nil {
|
||||
return nil
|
||||
}
|
||||
lp := opts.Inputs.ContextPath
|
||||
|
|
|
@ -464,12 +464,18 @@ func saveLocalStateGroup(dockerCli command.Cli, in bakeOptions, targets []string
|
|||
groupRef := identity.NewID()
|
||||
refs := make([]string, 0, len(bo))
|
||||
for k, b := range bo {
|
||||
if b.CallFunc != nil {
|
||||
continue
|
||||
}
|
||||
b.Ref = identity.NewID()
|
||||
b.GroupRef = groupRef
|
||||
b.ProvenanceResponseMode = prm
|
||||
refs = append(refs, b.Ref)
|
||||
bo[k] = b
|
||||
}
|
||||
if len(refs) == 0 {
|
||||
return nil
|
||||
}
|
||||
l, err := localstate.New(confutil.NewConfig(dockerCli))
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue