修复: 换装校验同版本重装误判不通过

- retryHash 与磁盘基线相同(同版本重装)时原判据走不进 pass 分支误报 mismatch
- 现区分两种通过情形: 确定性新装(installer deterministic output)与同版本重装(already up to date)各留日志
This commit is contained in:
lxy
2026-10-07 22:04:58 +08:00
parent 2441101978
commit 6bfcf01641
+6 -2
View File
@@ -120,8 +120,12 @@ try {
"[$(Get-Date -Format 'HH:mm:ss')] verify mismatch disk baseline, retry once" | Add-Content $log "[$(Get-Date -Format 'HH:mm:ss')] verify mismatch disk baseline, retry once" | Add-Content $log
Wait-HandleReleased | Out-Null Wait-HandleReleased | Out-Null
$retryHash = Invoke-SwapInstall 'retry' $retryHash = Invoke-SwapInstall 'retry'
if ($retryHash -and $firstHash -eq $retryHash -and $retryHash -ne $before.hash) { if ($retryHash -and $firstHash -eq $retryHash) {
"[$(Get-Date -Format 'HH:mm:ss')] verify pass (installer deterministic output $($retryHash.Substring(0, 12)))" | Add-Content $log if ($retryHash -ne $before.hash) {
"[$(Get-Date -Format 'HH:mm:ss')] verify pass (installer deterministic output $($retryHash.Substring(0, 12)))" | Add-Content $log
} else {
"[$(Get-Date -Format 'HH:mm:ss')] verify pass (already up to date, same version reinstalled)" | Add-Content $log
}
$pass = $true $pass = $true
} }
} }