Skip to content

Commit

Permalink
Merge pull request #33 from steved/trunk
Browse files Browse the repository at this point in the history
return exit code 1 when command line errors
  • Loading branch information
shihanng committed Oct 6, 2023
2 parents cb77389 + e48d61e commit 889722f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ var version = "dev"

func main() {
c, sync := cmd.New(os.Stdout, version)
_ = c.Execute()
defer sync()

sync()
if err := c.Execute(); err != nil {
os.Exit(1)
}
}

0 comments on commit 889722f

Please sign in to comment.