Skip to content

Commit

Permalink
Merge branch 'colors' of https://github.com/MarlonGamez/skaffold into…
Browse files Browse the repository at this point in the history
… colors
  • Loading branch information
MarlonGamez committed May 4, 2021
2 parents a5bfc84 + 32f0209 commit 877ae79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/skaffold/skaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ func main() {
if errors.Is(err, context.Canceled) {
logrus.Debugln("ignore error since context is cancelled:", err)
} else {
// Because we use cobra flags to setup colors for the main run, we can't run SetupColors()
// for the entire skaffold run here, and have to call it again before we print an error
// As we allow some color setup using CLI flags for the main run, we can't run SetupColors()
// for the entire skaffold run here. It's possible SetupColors() was never called, so call it again
// before we print an error to get the right coloring.
errOut := color.SetupColors(os.Stderr, color.DefaultColorCode, false)
color.Red.Fprintln(errOut, err)
code = exitCode(err)
Expand Down

0 comments on commit 877ae79

Please sign in to comment.