mirror of https://github.com/status-im/consul.git
main: do not process -v or --version after a '--'
This commit is contained in:
parent
04a2faed22
commit
45f599791e
3
main.go
3
main.go
|
@ -19,6 +19,9 @@ func realMain() int {
|
||||||
// just show the version.
|
// just show the version.
|
||||||
args := os.Args[1:]
|
args := os.Args[1:]
|
||||||
for _, arg := range args {
|
for _, arg := range args {
|
||||||
|
if arg == "--" {
|
||||||
|
break
|
||||||
|
}
|
||||||
if arg == "-v" || arg == "--version" {
|
if arg == "-v" || arg == "--version" {
|
||||||
newArgs := make([]string, len(args)+1)
|
newArgs := make([]string, len(args)+1)
|
||||||
newArgs[0] = "version"
|
newArgs[0] = "version"
|
||||||
|
|
Loading…
Reference in New Issue