fix: read JSON as UTF-8 so BOM-less packs load correctly (#844)

This commit is contained in:
wang13zhe
2026-10-21 16:54:20 +02:00
committed by GitHub
parent 55b7b48bb9
commit 97f3f805ef
6 changed files with 47 additions and 4 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ function Import-AppsFromFile {
}
try {
$jsonContent = Get-Content -Path $appsFilePath -Raw | ConvertFrom-Json
$jsonContent = Get-Content -Path $appsFilePath -Raw -Encoding UTF8 | ConvertFrom-Json
Foreach ($appData in $jsonContent.Apps) {
# Handle AppId as array (could be single or multiple IDs)
$appIdArray = if ($appData.AppId -is [array]) { $appData.AppId } else { @($appData.AppId) }