mirror of https://github.com/docker/buildx.git
Merge pull request #3168 from tonistiigi/bake-call-empty
bake: fix nil deference on empty call definition
This commit is contained in:
commit
7e960152a1
|
@ -261,13 +261,18 @@ func runBake(ctx context.Context, dockerCli command.Cli, targets []string, in ba
|
|||
return err
|
||||
}
|
||||
|
||||
for _, opt := range bo {
|
||||
for k, opt := range bo {
|
||||
if opt.CallFunc != nil {
|
||||
cf, err := buildflags.ParseCallFunc(opt.CallFunc.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
opt.CallFunc.Name = cf.Name
|
||||
if cf == nil {
|
||||
opt.CallFunc = nil
|
||||
bo[k] = opt
|
||||
} else {
|
||||
opt.CallFunc.Name = cf.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue