Fix issue where json encoding is wrong in PS5 (#7538)

This commit is contained in:
Vasilii Polikarpov
2023-05-09 17:15:03 +02:00
committed by GitHub
parent 8f4a9974b1
commit e2166f086d

View File

@@ -278,7 +278,7 @@ Function GenerateResourcesAndImage {
$builderScriptPath_temp = $builderScriptPath.Replace(".json", "-temp.json")
$packer_script = Get-Content -Path $builderScriptPath | ConvertFrom-Json
$packer_script.builders | Add-Member -Name "azure_tags" -Value $Tags -MemberType NoteProperty
$packer_script | ConvertTo-Json -Depth 3 | Out-File $builderScriptPath_temp
$packer_script | ConvertTo-Json -Depth 3 | Out-File -Encoding Ascii $builderScriptPath_temp
$builderScriptPath = $builderScriptPath_temp
}
}