Skip to content

Windows does not add new line in output when using file.replace. #42725

@Ch3LL

Description

@Ch3LL

Description of Issue/Question

Given the following text file:

c:\windows\temp\salt-call-replace-file.txt:

this is a free-
form text file.

When running the following command: salt-call --local file.replace 'c:\windows\temp\salt-call-replace-file.txt' pattern="form" repl="for-all" it does not add a newline to the output as shown below:

PS C:\salt> salt-call --local file.replace 'c:\windows\temp\salt-call-replace-file.txt' pattern="form" repl="for-all"
local:
    ---
    +++
    @@ -1,2 +1,2 @@
     this is a free-
    -form text file.+for-all text file.

Everything works correctly the resulting output just does not display correctly in powershell. This only affects windows and is not a regression

Versions Report

2017.7

Metadata

Metadata

Assignees

Labels

Execution-ModulePlatformRelates to OS, containers, platform-based utilities like FS, system based appsWindowsbugbroken, incorrect, or confusing behaviorgood first issuegood for someone new to saltseverity-low4th level, cosemtic problems, work around exists

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions