diff --git a/cli/cli.go b/cli/cli.go index 277cbb50..879b4ebe 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -39,7 +39,7 @@ import ( // Application info const ( APP = "bibop" - VER = "7.2.0" + VER = "7.2.1" DESC = "Utility for testing command-line tools" ) @@ -150,7 +150,16 @@ func preConfigureUI() { } } - if !fsutil.IsCharacterDevice("/dev/stdout") && os.Getenv("FAKETTY") == "" { + if os.Getenv("CI") == "" { + fmtutil.SeparatorFullscreen = true + } else { + fmtc.DisableColors = false + } + + // Check for output redirect using pipes + if fsutil.IsCharacterDevice("/dev/stdin") && + !fsutil.IsCharacterDevice("/dev/stdout") && + os.Getenv("FAKETTY") == "" { fmtc.DisableColors = true rawOutput = true } @@ -166,10 +175,6 @@ func configureUI() { fmtc.DisableColors = true } - if os.Getenv("CI") == "" { - fmtutil.SeparatorFullscreen = true - } - fmtutil.SeparatorSymbol = "–" switch {