Skip to content

Commit

Permalink
Issue #3: fix color output on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zupzup committed Jun 18, 2017
1 parent a011a73 commit a9e9756
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bufio"
"flag"
"fmt"
"github.com/fatih/color"
"github.com/kardianos/osext"
homedir "github.com/mitchellh/go-homedir"
"github.com/zupzup/calories/command"
Expand Down Expand Up @@ -126,13 +127,13 @@ func main() {
if err != nil {
fatalError(r, err)
}
fmt.Println(res)
fmt.Fprintln(color.Output, res)
} else {
res, err := handleNoSubCommand(commandsFlag, outputFlag, ds, r, os.Args)
if err != nil {
fatalError(r, err)
}
fmt.Println(res)
fmt.Fprintln(color.Output, res)
}
}

Expand Down

0 comments on commit a9e9756

Please sign in to comment.