mirror of
https://github.com/drone/drone-cli.git
synced 2024-11-23 01:11:57 +01:00
support colors in windows terminal
This commit is contained in:
parent
1045e35283
commit
290cfa3fe7
2
Gopkg.lock
generated
2
Gopkg.lock
generated
@ -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
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user