test:run_boot_test.ps1 配置文件读取显式 UTF-8(PS5.1 按 GBK 解码致 JSON 解析失败)

This commit is contained in:
2026-09-20 02:48:56 +08:00
parent 6f51c62a9e
commit 2375569f96
+1 -1
View File
@@ -61,7 +61,7 @@ $cfgFile = Join-Path $repoRoot ".opencode\serial_config.json"
# -Port default: the single source of truth is .opencode/serial_config.json
if (-not $Port) {
if (Test-Path -LiteralPath $cfgFile) {
$Port = (Get-Content -LiteralPath $cfgFile -Raw | ConvertFrom-Json).portName
$Port = (Get-Content -LiteralPath $cfgFile -Raw -Encoding UTF8 | ConvertFrom-Json).portName
}
}
if (-not $Port) {