mirror of https://github.com/docker/compose.git
report error when there's no container to start
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
396d449d36
commit
0a5b43d1e3
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue