mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
blockinfile will always add newline at EOF (#2261)
This commit is contained in:
committed by
Matt Clay
parent
fae2a50d4d
commit
393ea3293c
@@ -280,7 +280,9 @@ def main():
|
||||
lines[n0:n0] = blocklines
|
||||
|
||||
if lines:
|
||||
result = '\n'.join(lines)+'\n'
|
||||
result = '\n'.join(lines)
|
||||
if original.endswith('\n'):
|
||||
result += '\n'
|
||||
else:
|
||||
result = ''
|
||||
if original == result:
|
||||
|
||||
Reference in New Issue
Block a user