mirror of
https://github.com/docker/compose.git
synced 2025-07-26 15:14:04 +02:00
Fix start display : do not mix logs with progress
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
c9028f9f37
commit
7f3db85b11
@ -24,7 +24,6 @@ import (
|
|||||||
|
|
||||||
"github.com/docker/compose-cli/api/client"
|
"github.com/docker/compose-cli/api/client"
|
||||||
"github.com/docker/compose-cli/api/compose"
|
"github.com/docker/compose-cli/api/compose"
|
||||||
"github.com/docker/compose-cli/api/progress"
|
|
||||||
"github.com/docker/compose-cli/cli/formatter"
|
"github.com/docker/compose-cli/cli/formatter"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -59,17 +58,16 @@ func runStart(ctx context.Context, opts startOptions, services []string) error {
|
|||||||
if !opts.Detach {
|
if !opts.Detach {
|
||||||
consumer = formatter.NewLogConsumer(ctx, os.Stdout)
|
consumer = formatter.NewLogConsumer(ctx, os.Stdout)
|
||||||
}
|
}
|
||||||
_, err = progress.Run(ctx, func(ctx context.Context) (string, error) {
|
|
||||||
project, err := opts.toProject()
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = filter(project, services)
|
project, err := opts.toProject()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return err
|
||||||
}
|
}
|
||||||
return "", c.ComposeService().Start(ctx, project, consumer)
|
|
||||||
})
|
err = filter(project, services)
|
||||||
return err
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return c.ComposeService().Start(ctx, project, consumer)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user