From ac3fc796e63b95128fdbdf67ea7fad71bd59aa76 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 7 Aug 2019 11:12:37 +0200 Subject: [PATCH] fix bad boolean regexp --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6a0559d..388a963 100644 --- a/index.js +++ b/index.js @@ -171,7 +171,7 @@ module.exports = function (args, opts) { setArg(key, args[i+1], arg); i++; } - else if (args[i+1] && /true|false/.test(args[i+1])) { + else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { setArg(key, args[i+1] === 'true', arg); i++; }