Skip to content

Commit

Permalink
Add documentation for exit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohan Robert committed Aug 9, 2019
1 parent 95623b9 commit dc5b8a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ Database drivers: `+strings.Join(database.List(), ", ")+"\n")

default:
flag.Usage()

// If a command is not found we exit with a status 2 to match the behavior
// of flag.Parse() with flag.ExitOnError when parsing an invalid flag.
os.Exit(2)
}
}

0 comments on commit dc5b8a4

Please sign in to comment.