Skip to content

Commit cadd79a

Browse files
Fix issue with BOM
1 parent 1f767c3 commit cadd79a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test-example.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ function Process-AspNetCoreProject {
229229
}
230230

231231
if ($updated) {
232-
$packageJson | ConvertTo-Json -Depth 10 | Set-Content -Path $packageJsonPath -Encoding UTF8
232+
#$packageJson | ConvertTo-Json -Depth 10 | Set-Content -Path $packageJsonPath -Encoding UTF8
233+
$jsonContent = $packageJson | ConvertTo-Json -Depth 10
234+
[System.IO.File]::WriteAllText($packageJsonPath, $jsonContent, [System.Text.Encoding]::UTF8)
233235
Write-Host "Updated package.json with valid versions."
234236
} else {
235237
Write-Host "No matching dependencies found in package.json to update."

0 commit comments

Comments
 (0)