Skip to content

Commit

Permalink
Do not disable colors on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed May 15, 2023
1 parent 58ab1e4 commit 5a7f00a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ func preConfigureUI() {
fmtc.DisableColors = false
}

if !fsutil.IsCharacterDevice("/dev/stdout") && os.Getenv("FAKETTY") == "" {
// Check for output redirect using pipes
if fsutil.IsCharacterDevice("/dev/stdin") &&
!fsutil.IsCharacterDevice("/dev/stdout") &&
os.Getenv("FAKETTY") == "" {
fmtc.DisableColors = true
rawOutput = true
}
Expand Down

0 comments on commit 5a7f00a

Please sign in to comment.