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 cache option to config file #351

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

domingo2000
Copy link

Solves #309

Added the cache options to the configuration file as requested in that issue.

  1. If given no configuration of cache in file nor in command line options behave as actual implementation
  2. If given configuration in the file the cache options are set, but can be overrided if given in the CLI command line options

So this is usefull to not have to put the command line options all the time when running the command.

@files = @options[:stdin] || dupped_args

load_config

cache_dir = @options[:cache_dir]
if cache? && autocorrect?
failure!("cannot run autocorrect mode with cache")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not fail here. It was a bit annoying when options were passed on the command line but with the options in the config file, it will be even less easy to get out of the problem.
The cache shouldn't be enabled, and we should also handle the clear cache option.

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