mirror of
https://github.com/docker/compose.git
synced 2025-07-28 16:14:06 +02:00
force plain displaymode if stdout isn't a terminal
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
41a9b91887
commit
c89f30170d
@ -130,7 +130,12 @@ type buildStatus struct {
|
||||
func (s *composeService) doBuildBake(ctx context.Context, project *types.Project, serviceToBeBuild types.Services, options api.BuildOptions) (map[string]string, error) { //nolint:gocyclo
|
||||
eg := errgroup.Group{}
|
||||
ch := make(chan *client.SolveStatus)
|
||||
display, err := progressui.NewDisplay(os.Stdout, progressui.DisplayMode(options.Progress))
|
||||
out := s.dockerCli.Out()
|
||||
displayMode := progressui.DisplayMode(options.Progress)
|
||||
if !out.IsTerminal() {
|
||||
displayMode = progressui.PlainMode
|
||||
}
|
||||
display, err := progressui.NewDisplay(out, displayMode)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user