diff options
Diffstat (limited to 'app/backends/envs.py')
| -rw-r--r-- | app/backends/envs.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/backends/envs.py b/app/backends/envs.py index 7b3c54b..cfeeec6 100644 --- a/app/backends/envs.py +++ b/app/backends/envs.py @@ -113,18 +113,21 @@ def pip_install(packages: List[str], *, emit=None, cancel=None) -> int: return common.run_console_subprocess(argv, emit=emit, cancel=cancel) -def pip_uninstall(packages: List[str]) -> int: +def pip_uninstall(packages: List[str], *, emit=None) -> int: """pip uninstall PACKAGES from the venv. Returns pip's exit code. Used by the backends' ``uninstall`` action to remove pip-installed TTS packages from the managed environment. A missing env is a no-op (there - is nothing to uninstall from), reported as success. + is nothing to uninstall from), reported as success. With EMIT given + (the in-TUI task view) pip runs with its output piped and streamed to + EMIT, so nothing writes to the terminal behind curses. """ if not env_exists(): return 0 print(f"[INFO] pip uninstall {' '.join(packages)} from {ENV_DIR}...") return common.run_console_subprocess( - [str(env_python()), "-m", "pip", "uninstall", "-y", *packages]) + [str(env_python()), "-m", "pip", "uninstall", "-y", *packages], + emit=emit) def module_available(module: str) -> bool: |
