mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Merge pull request #340 from jesseduffield/alright-ed
This commit is contained in:
commit
da650f4384
1 changed files with 12 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -247,6 +248,7 @@ func (gui *Gui) renderContainerLogsAux(container *commands.Container, stop, noti
|
||||||
ShowStderr: true,
|
ShowStderr: true,
|
||||||
Timestamps: gui.Config.UserConfig.Logs.Timestamps,
|
Timestamps: gui.Config.UserConfig.Logs.Timestamps,
|
||||||
Since: gui.Config.UserConfig.Logs.Since,
|
Since: gui.Config.UserConfig.Logs.Since,
|
||||||
|
Follow: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
gui.Log.Error(err)
|
gui.Log.Error(err)
|
||||||
|
|
@ -255,9 +257,16 @@ func (gui *Gui) renderContainerLogsAux(container *commands.Container, stop, noti
|
||||||
|
|
||||||
mainView := gui.getMainView()
|
mainView := gui.getMainView()
|
||||||
|
|
||||||
_, err = stdcopy.StdCopy(mainView, mainView, readCloser)
|
if container.DetailsLoaded() && container.Details.Config.Tty {
|
||||||
if err != nil {
|
_, err = io.Copy(mainView, readCloser)
|
||||||
gui.Log.Error(err)
|
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
|
// if we are here because the task has been stopped, we should return
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue