From 51fc5717ecff0da1158d8fa8be93323255aacb7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20St=C3=B6lzle?= Date: Sat, 8 Jul 2023 10:32:16 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Create=20unique=20report=20by=20def?= =?UTF-8?q?ault=20with=20`--all`=20(#74)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ec192f0..155697c 100755 --- a/index.js +++ b/index.js @@ -184,7 +184,7 @@ const cli = meow( throw new Error('please provide a valid path for the JSON output') } - const uniqueFlag = _unique === 'both' ? 'both' : _unique === 'true' + let uniqueFlag = _unique === 'both' ? 'both' : _unique === 'true' if (![true, false, 'both'].includes(uniqueFlag)) { throw new Error('please provide a valid value for unique: true, false, both') } @@ -196,6 +196,9 @@ const cli = meow( secrets = true uses = true vars = true + + // if all is true, create unique report by default + uniqueFlag = 'both' } const report = new Reporting({