mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixing issue # 40167 with file.replace where the diff output does not
display correctly.
This commit is contained in:
parent
b0a2414d68
commit
28f7744cb6
1 changed files with 2 additions and 2 deletions
|
@ -2231,8 +2231,8 @@ def replace(path,
|
|||
check_perms(path, None, pre_user, pre_group, pre_mode)
|
||||
|
||||
if show_changes:
|
||||
orig_file_as_str = ''.join([salt.utils.to_str(x) for x in orig_file])
|
||||
new_file_as_str = ''.join([salt.utils.to_str(x) for x in new_file])
|
||||
orig_file_as_str = [salt.utils.to_str(x) for x in orig_file]
|
||||
new_file_as_str = [salt.utils.to_str(x) for x in new_file]
|
||||
return ''.join(difflib.unified_diff(orig_file_as_str, new_file_as_str))
|
||||
|
||||
return has_changes
|
||||
|
|
Loading…
Add table
Reference in a new issue