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

Use -- when invoking grep during add_config #240

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

Conversation

sparr
Copy link
Contributor

@sparr sparr commented Jun 16, 2023

Issue #, if available:
Fixes #62

Description of changes:
add_config invokes grep in two places to check for an existing identical pattern. This PR adds -- before the pattern so that grep won't interpret a pattern like "--foo" as an option.

Also add a test for this functionality. Also improve the error propagation in add_config, so that grep errors can be detected by tests.

This change should probably also be applied to some (all?) other grep and git grep invocations, but those are more complex cases without an outstanding bug report so I'm leaving them for now.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sparr sparr closed this Jun 20, 2023
@sparr sparr reopened this Jun 20, 2023
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.

How do you add a pattern that begins with '-'?
1 participant