Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 0a5b43d

Browse files
committed
report error when there's no container to start
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 396d449 commit 0a5b43d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/compose/convergence.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,10 @@ func (s *composeService) startService(ctx context.Context, project *types.Projec
556556
return err
557557
}
558558

559+
if len(containers) == 0 {
560+
return fmt.Errorf("no containers to start")
561+
}
562+
559563
w := progress.ContextWriter(ctx)
560564
eg, ctx := errgroup.WithContext(ctx)
561565
for _, container := range containers {

0 commit comments

Comments
 (0)