From 3b49e06f12d076dc2ec8448a36f5b0d2188599c4 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++; }