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

Fix issue with exclusions in config files and env vars #535

Merged
merged 9 commits into from
Mar 15, 2022

Conversation

joshtemple
Copy link
Collaborator

Change description

Previously, we were converting leading dashes in --explores and --folders args into tildes so they wouldn't break argparse. However, this meant we built our exclusion logic deeper in the application off of leading ~ instead -. For args passed via the config file or environment variables, preprocessing wasn't happening, so the leading dashes were not being converted to tildes.

Rather than keep everything in tildes, I thought it would be better to simply "undo" the preprocessing for command-line arguments after parsing is done.

This reverts the validator logic back to using - instead of ~, cleaning up the tilde-prepended args before they're passed out of the CLI. This also makes tests more readable.

Description here

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Related issues

Closes #526

Checklists

Security

  • Security impact of change has been considered
  • Code follows security best practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer

@joshtemple joshtemple changed the title Hotfix/config file explores Fix issue with exclusions in config files and env vars Mar 15, 2022
@DylanBaker DylanBaker merged commit 74767d5 into master Mar 15, 2022
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.

Can't exclude Explores using Config file with the new Spectacles 2.X
2 participants