gjtorikian / html-proofer

Test your rendered HTML files to make sure they're accurate.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`--cache` unvailable in CLI

asbjornu opened this issue · comments

From README.md:

On the CLI, you can provide the `--cache` 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.

On the CLI, you can provide the --cache 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 --cache 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: --cache
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: --cache (OptionParser::InvalidOption)

@asbjornu, you are still running on htmlproofer 3.19.4, whereas the README refers to the last major v4 release of HTMLProofer

If you want to know how to use that version, follow

htmlproofer 3.19.4 | Error:  Run your command again with the --help switch to see available options.

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!