Skip to content

Commit 7b60e86

Browse files
committed
Merge pull request PowerShell#2 from PowerShell/no_new_lines
Replace Set-Content by WriteAllText to avoid new lines at the end
2 parents 44f1017 + 9179fcd commit 7b60e86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MetaFixers.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function ConvertTo-UTF8()
1717
process
1818
{
1919
$content = Get-Content -Raw -Encoding Unicode -Path $fileInfo.FullName
20-
Set-Content -Encoding UTF8 -Value $content -Path $fileInfo.FullName
20+
[System.IO.File]::WriteAllText($fileInfo.FullName, $content, [System.Text.Encoding]::UTF8)
2121
}
2222
}
2323

@@ -33,7 +33,7 @@ function ConvertTo-SpaceIndentation()
3333
process
3434
{
3535
$content = (Get-Content -Raw -Path $fileInfo.FullName) -replace "`t",' '
36-
Set-Content -Value $content -Path $fileInfo.FullName
36+
[System.IO.File]::WriteAllText($fileInfo.FullName, $content)
3737
}
3838
}
3939

0 commit comments

Comments
 (0)