Preserve double dash values during flag alias parsing
This commit is contained in:
@@ -56,7 +56,7 @@ func interpretFlagTokens(argv []string, flags []commandmeta.Flag, aliases []comm
|
||||
index++
|
||||
continue
|
||||
}
|
||||
if !flag.Boolean && index+1 < len(argv) && argv[index+1] != "--" {
|
||||
if !flag.Boolean && index+1 < len(argv) {
|
||||
interpreted = append(interpreted, "--"+flag.Name+"="+argv[index+1])
|
||||
index += 2
|
||||
continue
|
||||
@@ -101,7 +101,7 @@ func interpretFlagTokens(argv []string, flags []commandmeta.Flag, aliases []comm
|
||||
interpreted = append(interpreted, "--"+flag.Name+"="+value)
|
||||
break
|
||||
}
|
||||
if index+1 < len(argv) && argv[index+1] != "--" {
|
||||
if index+1 < len(argv) {
|
||||
interpreted = append(interpreted, "--"+flag.Name+"="+argv[index+1])
|
||||
index += 2
|
||||
consumedNext = true
|
||||
|
||||
Reference in New Issue
Block a user