main: do not process -v or --version after a '--'

This commit is contained in:
Ryan Uber 2015-03-11 16:33:55 -07:00
parent 04a2faed22
commit 45f599791e
1 changed files with 3 additions and 0 deletions

View File

@ -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"