Skip to content

Commit

Permalink
test: fix BigTextPrinter test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Mar 18, 2022
1 parent 0c60941 commit a99d307
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bigtext_printer.go
Expand Up @@ -142,7 +142,7 @@ func (p BigTextPrinter) Srender() (string, error) {
letterLine += strings.Repeat(" ", maxLetterWidth-letterLineLength)
}

if letter.RGB != (RGB{}) && color.IsSupportRGBColor() {
if letter.RGB != (RGB{}) && (color.IsSupportRGBColor() || internal.RunsInCi()) {
ret += letter.RGB.Sprint(letterLine)
} else {
ret += letter.Style.Sprint(letterLine)
Expand Down
8 changes: 8 additions & 0 deletions internal/utils.go
@@ -0,0 +1,8 @@
package internal

import "os"

// RunsInCi returns true if the current build is running on a CI server.
func RunsInCi() bool {
return os.Getenv("CI") != ""
}

0 comments on commit a99d307

Please sign in to comment.