From 76b4ae40c6f96350d45dda8c4c8bf91c7278b4e2 Mon Sep 17 00:00:00 2001 From: John Mumm Date: Mon, 11 Aug 2025 22:36:03 +0200 Subject: [PATCH] Never create bin links on `uv python upgrade` if they don't already exist (#15192) Fixes #15178 --- crates/uv/src/commands/python/install.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/uv/src/commands/python/install.rs b/crates/uv/src/commands/python/install.rs index 40c98977e..3173133c7 100644 --- a/crates/uv/src/commands/python/install.rs +++ b/crates/uv/src/commands/python/install.rs @@ -764,6 +764,9 @@ fn create_bin_links( for target in targets { let target = bin.join(target); + if upgrade && !target.try_exists().unwrap_or_default() { + continue; + } let executable = if upgradeable { if let Some(minor_version_link) = PythonMinorVersionLink::from_installation(installation, preview)