mirror of https://github.com/docker/compose.git
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
5fc2b2a71c
commit
fb254aef45
|
|
@ -127,7 +127,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…
Reference in New Issue