mirror of
https://github.com/docker/compose.git
synced 2025-07-06 21:34:25 +02:00
Merge pull request #1641 from ndeloof/profiles
fix detecting active profiles implied by selected services
This commit is contained in:
commit
04c78c24e4
@ -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