Skip to content

Commit 3a26d04

Browse files
committed
Printing errors to STDERR
1 parent 8048762 commit 3a26d04

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

generator/cli/kallax/cmd.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"fmt"
45
"os"
56

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

1314
func main() {
14-
newApp().Run(os.Args)
15+
if err := newApp().Run(os.Args); err != nil {
16+
fmt.Fprintln(os.Stderr, err)
17+
os.Exit(1)
18+
}
1519
}
1620

1721
func newApp() *cli.App {

0 commit comments

Comments
 (0)