Skip to content

Commit

Permalink
main: do not process -v or --version after a '--'
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanuber committed Mar 11, 2015
1 parent 04a2fae commit 45f5997
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ func realMain() int {
// just show the version.
args := os.Args[1:]
for _, arg := range args {
if arg == "--" {
break
}
if arg == "-v" || arg == "--version" {
newArgs := make([]string, len(args)+1)
newArgs[0] = "version"
Expand Down

0 comments on commit 45f5997

Please sign in to comment.