Skip to content

Commit

Permalink
Merge pull request #340 from jesseduffield/alright-ed
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield authored May 11, 2022
2 parents 92ce88e + 8319aed commit da650f4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pkg/gui/containers_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"io"
"strings"
"time"

Expand Down Expand Up @@ -247,6 +248,7 @@ func (gui *Gui) renderContainerLogsAux(container *commands.Container, stop, noti
ShowStderr: true,
Timestamps: gui.Config.UserConfig.Logs.Timestamps,
Since: gui.Config.UserConfig.Logs.Since,
Follow: true,
})
if err != nil {
gui.Log.Error(err)
Expand All @@ -255,9 +257,16 @@ func (gui *Gui) renderContainerLogsAux(container *commands.Container, stop, noti

mainView := gui.getMainView()

_, err = stdcopy.StdCopy(mainView, mainView, readCloser)
if err != nil {
gui.Log.Error(err)
if container.DetailsLoaded() && container.Details.Config.Tty {
_, err = io.Copy(mainView, readCloser)
if err != nil {
gui.Log.Error(err)
}
} else {
_, err = stdcopy.StdCopy(mainView, mainView, readCloser)
if err != nil {
gui.Log.Error(err)
}
}

// if we are here because the task has been stopped, we should return
Expand Down

0 comments on commit da650f4

Please sign in to comment.