mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Bugfix: content at the beginning should be added as a line, instead of merged to the rest of the data
This commit is contained in:
parent
b42b762c57
commit
218331c882
@ -1922,7 +1922,7 @@ def line(path, content=None, match=None, mode=None, location=None,
|
||||
|
||||
else:
|
||||
if location == 'start':
|
||||
body = ''.join([content, body])
|
||||
body = os.linesep.join([content, body])
|
||||
elif location == 'end':
|
||||
body = ''.join([body, _get_line_indent(body[-1], content, indent) if body else content])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user