aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorRyan Schneider <ryanleeschneider@gmail.com>2018-10-08 22:08:56 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-10-08 22:08:56 +0800
commitcfcc47529dde0b7c82428ac3df8acee6c8648ccf (patch)
treee16a893ed8aa36ef59f4af131017d9da3f330dc5 /cmd/utils/flags.go
parentc5d34fc94eb3a8ce10c80d9a83e0e479d2dd654c (diff)
downloadgo-tangerine-cfcc47529dde0b7c82428ac3df8acee6c8648ccf.tar
go-tangerine-cfcc47529dde0b7c82428ac3df8acee6c8648ccf.tar.gz
go-tangerine-cfcc47529dde0b7c82428ac3df8acee6c8648ccf.tar.bz2
go-tangerine-cfcc47529dde0b7c82428ac3df8acee6c8648ccf.tar.lz
go-tangerine-cfcc47529dde0b7c82428ac3df8acee6c8648ccf.tar.xz
go-tangerine-cfcc47529dde0b7c82428ac3df8acee6c8648ccf.tar.zst
go-tangerine-cfcc47529dde0b7c82428ac3df8acee6c8648ccf.zip
cmd/utils: fix bug when checking for flag value conflicts (#17803)
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index b48f37177..429c2bbb9 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -1085,11 +1085,14 @@ func checkExclusive(ctx *cli.Context, args ...interface{}) {
if i+1 < len(args) {
switch option := args[i+1].(type) {
case string:
- // Extended flag, expand the name and shift the arguments
+ // Extended flag check, make sure value set doesn't conflict with passed in option
if ctx.GlobalString(flag.GetName()) == option {
name += "=" + option
+ set = append(set, "--"+name)
}
+ // shift arguments and continue
i++
+ continue
case cli.Flag:
default: