From 290cfa3fe738ab45f49b8a50ec9c288886a43f92 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 10 Oct 2018 16:51:03 -0700 Subject: [PATCH] support colors in windows terminal --- Gopkg.lock | 2 +- drone/exec/exec.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 3ab18d9..78ca9f3 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -283,6 +283,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "f183a4d8f5b52b34e0dc302acbee4dc64e0c12229cbde64b302a95d6d27be6df" + inputs-digest = "e876cc62fe39d562e521936b5afc6c520c0a1b826a44c17ecda377b10880c332" solver-name = "gps-cdcl" solver-version = 1 diff --git a/drone/exec/exec.go b/drone/exec/exec.go index 1575e68..316c4da 100644 --- a/drone/exec/exec.go +++ b/drone/exec/exec.go @@ -24,6 +24,7 @@ import ( "github.com/drone/signal" "github.com/joho/godotenv" + "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" "github.com/urfave/cli" ) @@ -284,7 +285,9 @@ func exec(c *cli.Context) error { hooks := &runtime.Hook{} hooks.GotLine = term.WriteLine(os.Stdout) if tty { - hooks.GotLine = term.WriteLinePretty(os.Stdout) + hooks.GotLine = term.WriteLinePretty( + colorable.NewColorableStdout(), + ) } return runtime.New(