diff --git a/conda_pip/main.py b/conda_pip/main.py index 4b2f740..2de82f8 100644 --- a/conda_pip/main.py +++ b/conda_pip/main.py @@ -189,8 +189,10 @@ def ensure_target_env_has_externally_managed(command: str): if path.exists(): path.unlink() ensure_externally_managed(target_prefix) - else: # remove + elif command == "remove": if list(prefix_data.query("pip")): # leave in place if pip is still installed return next(get_externally_managed_path(target_prefix)).unlink() + else: + raise ValueError(f"command {command} not recognized.")