gjtorikian / html-proofer

Test your rendered HTML files to make sure they're accurate.
MIT License
1.57k stars 199 forks source link

`--parallel` unavailable in CLI #762

Closed asbjornu closed 2 years ago

asbjornu commented 2 years ago

From README.md:

https://github.com/gjtorikian/html-proofer/blob/3b93cea9a5bd86d9af3e4d7b8dd2818e3f2a76bd/README.md?plain=1#L354

On the CLI, you can provide the --parallel argument to set the configuration. This is parsed using JSON.parse and mapped on top of the default configuration values so that they can be overridden.

However, when passing the --parallel argument to the CLI, HTMLProofer blows up:

htmlproofer 3.19.4 | Error:  Whoops, we can't understand your command.
htmlproofer 3.19.4 | Error:  invalid option: --parallel
htmlproofer 3.19.4 | Error:  Run your command again with the --help switch to see available options.
Traceback (most recent call last):
    19: from /Users/bitbear/gems/bin/bundle:23:in `<main>'
    18: from /Users/bitbear/gems/bin/bundle:23:in `load'
    17: from /Users/bitbear/gems/gems/bundler-2.2.28/exe/bundle:37:in `<top (required)>'
    16: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
    15: from /Users/bitbear/gems/gems/bundler-2.2.28/exe/bundle:49:in `block in <top (required)>'
    14: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/cli.rb:25:in `start'
    13: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    12: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/cli.rb:31:in `dispatch'
    11: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    10: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
     9: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
     8: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/cli.rb:478:in `exec'
     7: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/cli/exec.rb:23:in `run'
     6: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/cli/exec.rb:58:in `kernel_load'
     5: from /Users/bitbear/gems/gems/bundler-2.2.28/lib/bundler/cli/exec.rb:58:in `load'
     4: from /Users/bitbear/gems/bin/htmlproofer:25:in `<top (required)>'
     3: from /Users/bitbear/gems/bin/htmlproofer:25:in `load'
     2: from /Users/bitbear/gems/gems/html-proofer-3.19.4/bin/htmlproofer:11:in `<top (required)>'
     1: from /Users/bitbear/gems/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
/Users/bitbear/gems/gems/mercenary-0.4.0/lib/mercenary/program.rb:33:in `go': invalid option: --parallel (OptionParser::InvalidOption)
asbjornu commented 2 years ago

I'm also wondering what "This is parsed using JSON.parse" means.

riccardoporreca commented 2 years ago

Ditto https://github.com/gjtorikian/html-proofer/issues/763#issuecomment-1248193804

asbjornu commented 2 years ago

You are quite correct, @riccardoporreca. I was certain I was on the latest version since I have Dependabot configured, but I had a custom Checker gem that had a dependency on html-proofer ~> 3.0 which blocked the upgrade to v4. Sorry!