Merge pull request #3168 from tonistiigi/bake-call-empty

bake: fix nil deference on empty call definition
This commit is contained in:
CrazyMax
2025-05-12 09:13:05 +02:00
committed by GitHub
+7 -2
View File
@@ -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
}
}
}