Skip to content

Commit c37ede6

Browse files
ndeloofglours
authored andcommitted
on up buildOptions must include all enabled services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
1 parent 7eb5ade commit c37ede6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cmd/compose/compose.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ func (o *ProjectOptions) WithProject(fn ProjectFunc, dockerCli command.Cli) func
159159

160160
// WithServices creates a cobra run command from a ProjectFunc based on configured project options and selected services
161161
func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn ProjectServicesFunc) func(cmd *cobra.Command, args []string) error {
162-
return Adapt(func(ctx context.Context, args []string) error {
162+
return Adapt(func(ctx context.Context, services []string) error {
163163
backend, err := compose.NewComposeService(dockerCli)
164164
if err != nil {
165165
return err
166166
}
167167

168-
project, metrics, err := o.ToProject(ctx, dockerCli, backend, args, cli.WithoutEnvironmentResolution)
168+
project, metrics, err := o.ToProject(ctx, dockerCli, backend, services, cli.WithoutEnvironmentResolution)
169169
if err != nil {
170170
return err
171171
}
@@ -177,7 +177,7 @@ func (o *ProjectOptions) WithServices(dockerCli command.Cli, fn ProjectServicesF
177177
return err
178178
}
179179

180-
return fn(ctx, project, args)
180+
return fn(ctx, project, services)
181181
})
182182
}
183183

cmd/compose/up.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ func runUp(
263263
if err != nil {
264264
return err
265265
}
266-
bo.Services = services
266+
bo.Services = project.ServiceNames()
267267
bo.Deps = !upOptions.noDeps
268268
build = &bo
269269
}

0 commit comments

Comments
 (0)