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 option to skip errors when no matches are found #112

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

roqvist
Copy link
Contributor

@roqvist roqvist commented Sep 20, 2024

Adding a new option --allow-empty that, when supplied and no matches are found, prints the "No matches" -information and then exits without error (code 0).

My use case is similar to #104 where I run ruplacer as a pre-build task on some source code, and it typically only replaces when someone else made changes. I don't want subsequent attemps to necessarily throw errors, as the replacement has already been made.

Fixes #104

@dmerejkowsky
Copy link
Collaborator

Looks good to me :)

@dmerejkowsky dmerejkowsky merged commit be5aec2 into your-tools:main Oct 12, 2024
8 of 9 checks passed
@roqvist roqvist deleted the skip-errors branch October 12, 2024 14:08
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.

Error: nothing found to replace when no match found
2 participants