Skip to content

Commit cda4df5

Browse files
authored
include: import disabled services for proper profile activation (#448)
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent ae43465 commit cda4df5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

loader/include.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ func importResources(model *types.Config, imported *types.Project, path []string
114114
}
115115
model.Services = append(model.Services, service)
116116
}
117+
for _, service := range imported.DisabledServices {
118+
if _, ok := services[service.Name]; ok {
119+
return fmt.Errorf("imported compose file %s defines conflicting service %s", path, service.Name)
120+
}
121+
model.Services = append(model.Services, service)
122+
}
117123
for n, network := range imported.Networks {
118124
if _, ok := model.Networks[n]; ok {
119125
return fmt.Errorf("imported compose file %s defines conflicting network %s", path, n)

0 commit comments

Comments
 (0)