Skip to content

Commit

Permalink
Merge pull request #227 from jBugman/cli-errors
Browse files Browse the repository at this point in the history
Printing CLI errors to stderr
  • Loading branch information
roobre committed Nov 15, 2017
2 parents 8048762 + 3a26d04 commit b01ce17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generator/cli/kallax/cmd.go
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"os"

"gopkg.in/src-d/go-kallax.v1/generator/cli/kallax/cmd"
Expand All @@ -11,7 +12,10 @@ import (
const version = "1.3.0"

func main() {
newApp().Run(os.Args)
if err := newApp().Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}

func newApp() *cli.App {
Expand Down

0 comments on commit b01ce17

Please sign in to comment.