From 6bfcf01641ed9bb6ae1c619d72b36f03bd1cf52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Wed, 7 Oct 2026 22:04:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E6=8D=A2=E8=A3=85?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=90=8C=E7=89=88=E6=9C=AC=E9=87=8D=E8=A3=85?= =?UTF-8?q?=E8=AF=AF=E5=88=A4=E4=B8=8D=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - retryHash 与磁盘基线相同(同版本重装)时原判据走不进 pass 分支误报 mismatch - 现区分两种通过情形: 确定性新装(installer deterministic output)与同版本重装(already up to date)各留日志 --- swap-install.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/swap-install.ps1 b/swap-install.ps1 index aa9df2e..04c9d1c 100644 --- a/swap-install.ps1 +++ b/swap-install.ps1 @@ -120,8 +120,12 @@ try { "[$(Get-Date -Format 'HH:mm:ss')] verify mismatch disk baseline, retry once" | Add-Content $log Wait-HandleReleased | Out-Null $retryHash = Invoke-SwapInstall 'retry' - if ($retryHash -and $firstHash -eq $retryHash -and $retryHash -ne $before.hash) { - "[$(Get-Date -Format 'HH:mm:ss')] verify pass (installer deterministic output $($retryHash.Substring(0, 12)))" | Add-Content $log + if ($retryHash -and $firstHash -eq $retryHash) { + 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 } }