Merge pull request #1343 from dgageot/fix-1342

[1342] Fix assignment to nil map
pull/1352/head
CrazyMax 2 years ago committed by GitHub
commit 398da1f916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save