But I encountered a problem while I'm working on this.
This flag name starts with no, and that's why it is treated as 'negation' flag in yargs-parser
This resulted in the below situation.
// 'no-block-ads' flag is true ('block-ad' is false)
$ node cli.js some_url --output=a.png --overwrite --no-block-ads=true
// 'no-block-ads' flag is false ('block-ad' is true), which is different from users' expectation.
$ node cli.js some_url --output=a.png --overwrite --no-block-ads
I'm a little confusing... May I ask how should I handle this?
I added
no-block-ads
flag added from https://github.com/sindresorhus/capture-website/pull/98.But I encountered a problem while I'm working on this.
This flag name starts with
no
, and that's why it is treated as 'negation' flag in yargs-parserThis resulted in the below situation.
I'm a little confusing... May I ask how should I handle this?