ensure build dependencies are enabled
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
7f9101845d
commit
f2a88e02a0
@ -85,11 +85,17 @@ func (s *composeService) build(ctx context.Context, project *types.Project, opti
|
|||||||
policy = types.IncludeDependencies
|
policy = types.IncludeDependencies
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var err error
|
||||||
if len(options.Services) > 0 {
|
if len(options.Services) > 0 {
|
||||||
// As user requested some services to be built, also include those used as additional_contexts
|
// As user requested some services to be built, also include those used as additional_contexts
|
||||||
options.Services = addBuildDependencies(options.Services, project)
|
options.Services = addBuildDependencies(options.Services, project)
|
||||||
|
// Some build dependencies we just introduced may not be enabled
|
||||||
|
project, err = project.WithServicesEnabled(options.Services...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
project, err := project.WithSelectedServices(options.Services)
|
project, err = project.WithSelectedServices(options.Services)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user