From de6a8609a81472b5be786c7404576905ebb981fb Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Fri, 26 Jun 2020 16:22:04 -0500 Subject: Set console mode for windows Windows terminal handling is different than darwin and linux. It needs to have the terminal mode set to enable virtual terminal processing. This allows colors and other things to work. Signed-off-by: Brent Baude Signed-off-by: Matt Heon --- cmd/podman/main.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/podman/main.go') diff --git a/cmd/podman/main.go b/cmd/podman/main.go index f3b1dcc5d..c229e9881 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -16,7 +16,9 @@ import ( _ "github.com/containers/libpod/v2/cmd/podman/system" _ "github.com/containers/libpod/v2/cmd/podman/volumes" "github.com/containers/libpod/v2/pkg/rootless" + "github.com/containers/libpod/pkg/terminal" "github.com/containers/storage/pkg/reexec" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -58,6 +60,10 @@ func main() { } } } + if err := terminal.SetConsole(); err != nil { + logrus.Error(err) + os.Exit(1) + } Execute() os.Exit(0) -- cgit v1.2.3-54-g00ecf