Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from wavesoftware/feature/support-color-forced-…
Browse files Browse the repository at this point in the history
…output

Forced color output when FORCE_COLOR env var is set
  • Loading branch information
cardil authored Aug 19, 2020
2 parents e87068b + 9e4f907 commit 943ed41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path"

"github.com/fatih/color"
"github.com/magefile/mage/sh"
"github.com/wavesoftware/go-ensure"
"github.com/wavesoftware/go-magetasks/config"
Expand Down Expand Up @@ -63,3 +64,9 @@ func relativeToRepo(paths []string) string {
}
return path.Join(fullpath...)
}

func init() {
if val, envset := os.LookupEnv("FORCE_COLOR"); envset && val == "true" {
color.NoColor = false
}
}

0 comments on commit 943ed41

Please sign in to comment.