forked from home-assistant/os-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix edgecases for lineinfile module (home-assistant#221)
Edgecases where the file contains only a single line and no before/after regexp was given were not handled correctly. Also the Find method should accept empty string for searching from the beginning of the file. Moreover, it's useful if the file can be created by Present (it's also what Ansible does), so handle this case too.
- Loading branch information
Showing
2 changed files
with
64 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters