mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-19 01:47:43 +08:00
Fix assignment to nil map
Signed-off-by: David Gageot <david.gageot@docker.com>
This commit is contained in:
parent
105c214d15
commit
8fd34669ed
@ -801,6 +801,9 @@ func BuildWithResultHandler(ctx context.Context, drivers []DriverInfo, opt map[s
|
|||||||
}
|
}
|
||||||
for n, v := range gitLabels {
|
for n, v := range gitLabels {
|
||||||
if _, ok := opt.Labels[n]; !ok {
|
if _, ok := opt.Labels[n]; !ok {
|
||||||
|
if opt.Labels == nil {
|
||||||
|
opt.Labels = map[string]string{}
|
||||||
|
}
|
||||||
opt.Labels[n] = v
|
opt.Labels[n] = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user