Skip to content

Commit

Permalink
fix: Provide working version of ARM content injection (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkerkhove authored Oct 8, 2021
1 parent f41369a commit 753bee4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,4 @@ ASALocalRun/
docs/build
docs/.docusaurus
docs/node_modules
.vscode
6 changes: 5 additions & 1 deletion src/Arcus.Scripting.ARM/Scripts/Inject-ArmContent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ function InjectFile {
Write-Host "`t Replacing special characters"

# Replace newline characters with literal equivalents
$newString = $newString -replace "`r", "[System.Environment]::NewLine"
if ([environment]::OSVersion.VersionString -like "*Windows*") {
$newString = $newString -replace "`n", "\r\n"
} else {
$newString = $newString -replace "`n", "\n"
}

# Replace tabs with spaces
$newString = $newString -replace "`t", " "
Expand Down

0 comments on commit 753bee4

Please sign in to comment.