Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --no-block-ads flag #39

Merged
merged 4 commits into from
Feb 3, 2022
Merged

Add --no-block-ads flag #39

merged 4 commits into from
Feb 3, 2022

Conversation

jopemachine
Copy link
Contributor

@jopemachine jopemachine commented Feb 3, 2022

I added no-block-ads flag added from sindresorhus/capture-website#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-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?

@jopemachine
Copy link
Contributor Author

Oh, never mind..
I think I found a solution in this PR

@jopemachine jopemachine marked this pull request as ready for review February 3, 2022 11:48
@sindresorhus sindresorhus merged commit 6291705 into sindresorhus:main Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants