Skip to content

Commit

Permalink
fixed project.go
Browse files Browse the repository at this point in the history
Signed-off-by: Suleiman Dibirov <[email protected]>
  • Loading branch information
idsulik committed Nov 27, 2024
1 parent e608b09 commit b378ecd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion types/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,11 @@ func (p Project) WithServicesLabelsResolved(discardLabelFiles bool) (*Project, e
}

labels = labels.OverrideBy(service.Labels.ToMappingWithEquals())
service.Labels = NewLabelsFromMappingWithEquals(labels)
if len(labels) == 0 {
labels = nil
} else {
service.Labels = NewLabelsFromMappingWithEquals(labels)
}

if discardLabelFiles {
service.LabelFiles = nil
Expand Down

0 comments on commit b378ecd

Please sign in to comment.