From 1b70618de2f93279bd19a9b4f75b332b81db0cea Mon Sep 17 00:00:00 2001 From: danbulant Date: Fri, 21 Feb 2020 16:39:36 +0100 Subject: [PATCH] Values for flags only if long variant used --- modules/args.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/args.js b/modules/args.js index 881fa99..a68744a 100644 --- a/modules/args.js +++ b/modules/args.js @@ -37,7 +37,7 @@ con.forEach((a, i) => { if(a.type == "flag"){ var next = con[i + 1]; if(next){ - if(next.type == "content"){ + if (next.type == "content" && a.variant == "long"){ skipNext = true; return flags[a.content] = next.content; } @@ -47,6 +47,8 @@ con.forEach((a, i) => { contents.push(a.content); }); +global.flags = flags; +global.contents = contents; module.exports = { args: con, flags,