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 new file_line option append_on_no_match #717

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

ripclawffb
Copy link
Contributor

Currently, there doesn't exist a way to leave a file untouched if no regex matches are found.

I have a use case where I'm searching for a specific regex in multiple files and I only want to update the files that contain the regex pattern.

@tphoney
Copy link
Contributor

tphoney commented Jul 7, 2017

@ripclawffb There have been a number of changes in the file_line can you see if this PR is still necessary.

More importantly apologies for the slowness to getting to this PR

@ripclawffb
Copy link
Contributor Author

@tphoney I reviewed the changes for file_line and there still doesn't seem to be an option to not add a line if a match is not found in a file.

I also went ahead and rebased as requested.

@eputnam
Copy link
Contributor

eputnam commented Jul 18, 2017

rebased again @tphoney, looks ok pending travis. @ripclawffb take a look if you'd like to make sure it still looks ok to you.

@ripclawffb
Copy link
Contributor Author

@eputnam thanks! looks good to me.

@eputnam eputnam merged commit d65a144 into puppetlabs:master Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants