mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
fix detecting active profiles implied by selected services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
7840be9693
commit
13f37cf1c8
@ -120,11 +120,13 @@ func (o *projectOptions) toProject(services []string, po ...cli.ProjectOptionsFn
|
|||||||
return nil, metrics.WrapComposeError(err)
|
return nil, metrics.WrapComposeError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
s, err := project.GetServices(services...)
|
if len(services) > 0 {
|
||||||
if err != nil {
|
s, err := project.GetServices(services...)
|
||||||
return nil, err
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
o.Profiles = append(o.Profiles, s.GetProfiles()...)
|
||||||
}
|
}
|
||||||
o.Profiles = append(o.Profiles, s.GetProfiles()...)
|
|
||||||
|
|
||||||
if profiles, ok := options.Environment["COMPOSE_PROFILES"]; ok {
|
if profiles, ok := options.Environment["COMPOSE_PROFILES"]; ok {
|
||||||
o.Profiles = append(o.Profiles, strings.Split(profiles, ",")...)
|
o.Profiles = append(o.Profiles, strings.Split(profiles, ",")...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user