handle = input

This commit is contained in:
Lynn Cyrin 2019-09-11 20:24:42 -07:00
parent fcfc69e54f
commit 49dbeed687
No known key found for this signature in database
GPG Key ID: EE9CCB427DFEC897

View File

@ -252,10 +252,11 @@ func reorderArgs(commandFlags []Flag, args []string) []string {
}
func argIsFlag(commandFlags []Flag, arg string) bool {
strippedArg := strings.ReplaceAll(arg, "-", "")
arg = strings.ReplaceAll(arg, "-", "")
arg = strings.Split(arg, "=")[0]
for _, flag := range commandFlags {
for _, key := range strings.Split(flag.GetName(), ",") {
if key == strippedArg {
if key == arg {
return true
}
}