Skip to content

Commit

Permalink
fix: Issue where error codes were not printed, and exit code was alwa…
Browse files Browse the repository at this point in the history
…ys 0 (#27)
  • Loading branch information
boukeversteegh committed Mar 30, 2022
1 parent fc0e0d2 commit 3452355
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ var Version string
var contains = util.Contains

func main() {
RunCli(os.Args[1:])
err, exitCode := RunCli(os.Args[1:])
if err != nil {
fmt.Printf("%s\n", err)
}
os.Exit(exitCode)
}

func RunCli(args []string) (err error, exitCode int) {
Expand Down

0 comments on commit 3452355

Please sign in to comment.