From 736b7a47077af74c78d8251dfc64d0ad35c818f1 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Wed, 1 Jul 2020 19:04:24 +0200 Subject: [PATCH] Fix logs replacement when streaming logs on windows --- cli/cmd/logs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/cmd/logs.go b/cli/cmd/logs.go index eae7667f5..d00a1acf6 100644 --- a/cli/cmd/logs.go +++ b/cli/cmd/logs.go @@ -18,8 +18,8 @@ package cmd import ( "context" - "os" + "github.com/containerd/console" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -59,7 +59,7 @@ func runLogs(ctx context.Context, containerName string, opts logsOpts) error { req := containers.LogsRequest{ Follow: opts.Follow, Tail: opts.Tail, - Writer: os.Stdout, + Writer: console.Current(), } return c.ContainerService().Logs(ctx, containerName, req)