mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #49090 from dwoz/file_line_fix
Search for (but do not include) CRLF line ending
This commit is contained in:
commit
8954dd269f
1 changed files with 1 additions and 1 deletions
|
@ -2111,7 +2111,7 @@ def replace(path,
|
|||
if prepend_if_not_found or append_if_not_found:
|
||||
# Search for content, to avoid pre/appending the
|
||||
# content if it was pre/appended in a previous run.
|
||||
if re.search(salt.utils.to_bytes('^{0}$'.format(re.escape(content))),
|
||||
if re.search(salt.utils.to_bytes('^{0}($|(?=\r\n))'.format(re.escape(content))),
|
||||
r_data,
|
||||
flags=flags_num):
|
||||
# Content was found, so set found.
|
||||
|
|
Loading…
Add table
Reference in a new issue