Merge pull request #7066 from VilledeMontreal/fix/crashOnMissingFlagValue

v3: fix(plugin): Avoid crash on missing flag
pull/7153/head
Matt Farina 5 years ago committed by GitHub
commit a626f279ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -151,8 +151,11 @@ func manuallyProcessArgs(args []string) ([]string, []string) {
case "--debug": case "--debug":
known = append(known, a) known = append(known, a)
case isKnown(a): case isKnown(a):
known = append(known, a, args[i+1]) known = append(known, a)
i++ i++
if i < len(args) {
known = append(known, args[i])
}
default: default:
if knownArg(a) { if knownArg(a) {
known = append(known, a) known = append(known, a)

Loading…
Cancel
Save