Skip to content

Commit 889722f

Browse files
authored
Merge pull request #33 from steved/trunk
return exit code 1 when command line errors
2 parents cb77389 + e48d61e commit 889722f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ var version = "dev"
1010

1111
func main() {
1212
c, sync := cmd.New(os.Stdout, version)
13-
_ = c.Execute()
13+
defer sync()
1414

15-
sync()
15+
if err := c.Execute(); err != nil {
16+
os.Exit(1)
17+
}
1618
}

0 commit comments

Comments
 (0)