From 0a5b43d1e3c2ab98eae1108c04a19e503e5778c7 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Mon, 12 Jul 2021 12:10:50 +0200 Subject: [PATCH] report error when there's no container to start Signed-off-by: Nicolas De Loof --- pkg/compose/convergence.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/compose/convergence.go b/pkg/compose/convergence.go index 5e5982e7b..58418cd9d 100644 --- a/pkg/compose/convergence.go +++ b/pkg/compose/convergence.go @@ -556,6 +556,10 @@ func (s *composeService) startService(ctx context.Context, project *types.Projec return err } + if len(containers) == 0 { + return fmt.Errorf("no containers to start") + } + w := progress.ContextWriter(ctx) eg, ctx := errgroup.WithContext(ctx) for _, container := range containers {