Skip to content

Commit 1cb5536

Browse files
gferonndeloof
authored andcommitted
Address review comments
Signed-off-by: Gabriel Féron <[email protected]>
1 parent e4850d9 commit 1cb5536

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

cmd/compose/pull.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func pullCommand(p *projectOptions, backend api.Service) *cobra.Command {
6868
return cmd
6969
}
7070

71-
func FilterServices(project *types.Project, services []string) error {
71+
func withSelectedServicesOnly(project *types.Project, services []string) error {
7272
enabled, err := project.GetServices(services...)
7373
if err != nil {
7474
return err
@@ -90,7 +90,10 @@ func runPull(ctx context.Context, backend api.Service, opts pullOptions, service
9090
}
9191

9292
if !opts.includeDeps {
93-
FilterServices(project, services)
93+
err := withSelectedServicesOnly(project, services)
94+
if err != nil {
95+
return err
96+
}
9497
}
9598

9699
return backend.Pull(ctx, project, api.PullOptions{

cmd/compose/push.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ func runPush(ctx context.Context, backend api.Service, opts pushOptions, service
5858
}
5959

6060
if !opts.IncludeDeps {
61-
FilterServices(project, services)
61+
err := withSelectedServicesOnly(project, services)
62+
if err != nil {
63+
return err
64+
}
6265
}
6366

6467
return backend.Push(ctx, project, api.PushOptions{

0 commit comments

Comments
 (0)