Merge pull request #10083 from ndeloof/nodeps

use recently introduced `withSelectedServicesOnly` to reduce code duplication
This commit is contained in:
Guillaume Lours 2022-12-15 15:51:29 +01:00 committed by GitHub
commit 0fedddb008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -55,16 +55,10 @@ type upOptions struct {
func (opts upOptions) apply(project *types.Project, services []string) error {
if opts.noDeps {
enabled, err := project.GetServices(services...)
err := withSelectedServicesOnly(project, services)
if err != nil {
return err
}
for _, s := range project.Services {
if !utils.StringContains(services, s.Name) {
project.DisabledServices = append(project.DisabledServices, s)
}
}
project.Services = enabled
}
if opts.exitCodeFrom != "" {