From c2e9064b35393d1d2d55d95f9fbdfc244e86b82f Mon Sep 17 00:00:00 2001 From: axelray-dev <110029405+axelray-dev@users.noreply.github.com> Date: Wed, 3 Jun 2026 10:56:43 +0800 Subject: [PATCH] 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 --- nanobot/apps/cli/service.py | 2 +- tests/cli_apps/test_service.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nanobot/apps/cli/service.py b/nanobot/apps/cli/service.py index b53957f16..906e5f14a 100644 --- a/nanobot/apps/cli/service.py +++ b/nanobot/apps/cli/service.py @@ -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() diff --git a/tests/cli_apps/test_service.py b/tests/cli_apps/test_service.py index c98f2449b..b6b58d919 100644 --- a/tests/cli_apps/test_service.py +++ b/tests/cli_apps/test_service.py @@ -843,6 +843,5 @@ def test_uninstall_uses_uv_pip_when_pip_unavailable( "uninstall", "--python", sys.executable, - "-y", "suno-cli", ]