From 23298685f0aa1a587cf599037622d4ceec736fe8 Mon Sep 17 00:00:00 2001 From: KoNit-K Date: Mon, 14 Sep 2026 06:31:04 +0800 Subject: [PATCH] fix(install): reject broken copied uv shims --- scripts/install.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 7294bc2051..61fb60e827 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -840,10 +840,14 @@ function Install-Uv { if ($existingUv) { Write-Info "Salvaging existing uv from $existingUv" try { - Copy-Item $existingUv $managedUv -Force # Verify the salvaged binary actually runs before # trusting it as the managed uv. - $null = & $managedUv --version + Copy-Item $existingUv $managedUv -Force + $salvagedVersion = & $managedUv --version + if ($LASTEXITCODE -ne 0) { + Write-Info "Copied uv at $managedUv failed validation; continuing fallback" + Remove-Item $managedUv -Force -ErrorAction SilentlyContinue + } } catch { Write-Info "Existing uv at $existingUv could not be salvaged: $_" Remove-Item $managedUv -Force -ErrorAction SilentlyContinue