Skip to content

Commit

Permalink
Use green logo on windows
Browse files Browse the repository at this point in the history
This commit sets the version logo colour to green so as to avoid
clashing with the Powershell default blue.

Signed-off-by: John McCabe <[email protected]>
  • Loading branch information
johnmccabe authored and alexellis committed Oct 9, 2017
1 parent b086321 commit 7d3026f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions commands/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package commands

import (
"fmt"
"runtime"

"github.com/morikuni/aec"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -44,8 +45,11 @@ func runVersion(cmd *cobra.Command, args []string) {
if shortVersion {
fmt.Println(Version)
} else {

fmt.Printf(aec.BlueF.Apply(figletStr))
figletColoured := aec.BlueF.Apply(figletStr)
if runtime.GOOS == "windows" {
figletColoured = aec.GreenF.Apply(figletStr)
}
fmt.Printf(figletColoured)
fmt.Printf("Commit: %s\n", GitCommit)
fmt.Printf("Version: %s\n", Version)
}
Expand Down

0 comments on commit 7d3026f

Please sign in to comment.