fix: remove unsupported -y flag from uv pip uninstall fallback

uv pip uninstall does not support the -y (assume-yes) flag. Remove it
from the uv fallback argv while keeping it for the python -m pip
uninstall path.

Reported-by: chengyongru
This commit is contained in:
axelray-dev 2026-06-03 10:56:43 +08:00 committed by Xubin Ren
parent 6d827efb0e
commit c2e9064b35
2 changed files with 1 additions and 2 deletions

View File

@ -734,7 +734,7 @@ class CliAppManager:
if self._pip_available():
prefix = [sys.executable, "-m", "pip", "uninstall", "-y"]
elif shutil.which("uv"):
prefix = ["uv", "pip", "uninstall", "--python", sys.executable, "-y"]
prefix = ["uv", "pip", "uninstall", "--python", sys.executable]
else:
raise CliAppError("pip is not available and uv is not installed")
distribution = str((installed_entry or {}).get("pip_distribution") or "").strip()

View File

@ -843,6 +843,5 @@ def test_uninstall_uses_uv_pip_when_pip_unavailable(
"uninstall",
"--python",
sys.executable,
"-y",
"suno-cli",
]