-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
How to set CLI option --check-external-hash
to false?
#735
Comments
@remarkablemark, I had the same issue at some point, but the help in fact also hints to the fact that options should follow the path
The following would do htmlproofer _site --check-external-hash false |
Thanks for the response @riccardoporreca! I tried your suggestion, but the build is still failing for me. See remarkablemark/remarkablemark.github.io#42:
|
@remarkablemark, indeed, the way such boolean command-line options are defined in Lines 23 to 24 in a9c58af
is meant for not specifying @gjtorikian, the natural approach to such cases (there are in fact others beyond hash checking) is to use enable the p.option 'check_external_hash', '--[no-]check-external-hash', 'Checks whether external hashes exist (even if the webpage exists) (default: `true`).'
p.option 'check_internal_hash', '--[no-]check-internal-hash', 'Checks whether internal hashes exist (even if the webpage exists) (default: `true`).' Passing p.option 'check_external_hash', '--check-external-hash <false>', TrueClass, 'Checks whether external hashes exist (even if the webpage exists) (default: `true`).'
p.option 'check_internal_hash', '--check-internal-hash <false>', TrueClass, 'Checks whether internal hashes exist (even if the webpage exists) (default: `true`).' Happy to help out with a PR (including tests) for wither of the two approaches. |
Thanks for the update @riccardoporreca. Would it be easier to default |
The CLI parser used here has often been a problem. The correct usage here is supposed to be |
Thank you @gjtorikian! |
When I run the command:
htmlproofer --check-external-hash false _site
I get the error:
This is from
htmlproofer --help
:The text was updated successfully, but these errors were encountered: