test:run_boot_test.ps1 配置文件读取显式 UTF-8(PS5.1 按 GBK 解码致 JSON 解析失败)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user