Improve Steps to Replace CRLF with LF
h4xhor opened this issue · comments
The CRLF with LF replacement currently done with opening a file and writing it back:
# Replace CRLF with LF
$text = [IO.File]::ReadAllText("$BUILD_DIR\$FILE") -replace "`r`n", "`n"
[IO.File]::WriteAllText("$BUILD_DIR\$FILE", $text)
can be done simpler with just:
# Replace CRLF with LF
$scriptContent = $scriptContent.replace("`r`n","`n")