mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-06-13 22:34:06 +00:00
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:
parent
6d827efb0e
commit
c2e9064b35
@ -734,7 +734,7 @@ class CliAppManager:
|
|||||||
if self._pip_available():
|
if self._pip_available():
|
||||||
prefix = [sys.executable, "-m", "pip", "uninstall", "-y"]
|
prefix = [sys.executable, "-m", "pip", "uninstall", "-y"]
|
||||||
elif shutil.which("uv"):
|
elif shutil.which("uv"):
|
||||||
prefix = ["uv", "pip", "uninstall", "--python", sys.executable, "-y"]
|
prefix = ["uv", "pip", "uninstall", "--python", sys.executable]
|
||||||
else:
|
else:
|
||||||
raise CliAppError("pip is not available and uv is not installed")
|
raise CliAppError("pip is not available and uv is not installed")
|
||||||
distribution = str((installed_entry or {}).get("pip_distribution") or "").strip()
|
distribution = str((installed_entry or {}).get("pip_distribution") or "").strip()
|
||||||
|
|||||||
@ -843,6 +843,5 @@ def test_uninstall_uses_uv_pip_when_pip_unavailable(
|
|||||||
"uninstall",
|
"uninstall",
|
||||||
"--python",
|
"--python",
|
||||||
sys.executable,
|
sys.executable,
|
||||||
"-y",
|
|
||||||
"suno-cli",
|
"suno-cli",
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user