disable progress UI when build is ran with --print

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2025-11-04 17:17:56 +01:00 committed by Guillaume Lours
parent af579ebd4b
commit 13870006fb

View File

@ -150,6 +150,9 @@ func buildCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *Back
}
func runBuild(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts buildOptions, services []string) error {
if opts.print {
backendOptions.Add(compose.WithEventProcessor(ui.NewQuietWriter()))
}
backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
if err != nil {
return err