Skip to content

Commit

Permalink
Fix uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Nov 6, 2024
1 parent 7102d39 commit b84df8f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/conda_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,13 @@ def uninstall(app_name):
if query_yes_no(f"The application {app_name} will be uninstalled.\nProceed"):
import shutil

path_root = conda_data["root_prefix"]
env_path = Path(path_root) / "envs" / env_name
shutil.rmtree(env_path, ignore_errors=True)
print(f"Directory {env_path} removed")
for env_path in conda_data["envs"]:
if env_path.endswith(os.path.sep + env_name):
shutil.rmtree(env_path, ignore_errors=True)
print(f"Directory {env_path} removed")
break

assert False, "Environment not found."


@main.command(name="list", context_settings=CONTEXT_SETTINGS)
Expand Down

0 comments on commit b84df8f

Please sign in to comment.