Skip to content

--cache unvailable in CLI #763

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

Closed
asbjornu opened this issue Sep 15, 2022 · 2 comments
Closed

--cache unvailable in CLI #763

asbjornu opened this issue Sep 15, 2022 · 2 comments

Comments

@asbjornu
Copy link
Contributor

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)
@riccardoporreca
Copy link
Collaborator

@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.

@asbjornu
Copy link
Contributor Author

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!

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

No branches or pull requests

2 participants