mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
Move colorable statements to fix Windows support. (#4287)
This puts it in the main command level. Fixes #4070
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/hashicorp/vault/command/token"
|
||||
colorable "github.com/mattn/go-colorable"
|
||||
"github.com/mitchellh/cli"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
@@ -99,10 +100,10 @@ func RunCustom(args []string, runOpts *RunOptions) int {
|
||||
runOpts = &RunOptions{}
|
||||
}
|
||||
if runOpts.Stdout == nil {
|
||||
runOpts.Stdout = os.Stdout
|
||||
runOpts.Stdout = colorable.NewColorable(os.Stdout)
|
||||
}
|
||||
if runOpts.Stderr == nil {
|
||||
runOpts.Stderr = os.Stderr
|
||||
runOpts.Stderr = colorable.NewColorable(os.Stderr)
|
||||
}
|
||||
|
||||
args = setupEnv(args)
|
||||
|
||||
Reference in New Issue
Block a user