X Tutup
Skip to content

Commit 4be04ad

Browse files
committed
Fix ANSI color output on Windows
1 parent b21b93a commit 4be04ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/table_printer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"io"
66
"os"
77

8+
"github.com/mattn/go-colorable"
89
"golang.org/x/crypto/ssh/terminal"
910
)
1011

@@ -24,7 +25,7 @@ func NewTablePrinter(w io.Writer) TablePrinter {
2425
ttyWidth = w
2526
}
2627
return &ttyTablePrinter{
27-
out: w,
28+
out: colorable.NewColorable(outFile),
2829
maxWidth: ttyWidth,
2930
}
3031
}

0 commit comments

Comments
 (0)
X Tutup