Skip to content

Commit

Permalink
Merge pull request galaxyproject#16460 from bernt-matthias/topic/neve…
Browse files Browse the repository at this point in the history
…r-del-galaxy-conda-env

Never consider `_galaxy_` conda env as unused
  • Loading branch information
mvdbeek authored Jul 25, 2023
2 parents 03ad09c + 77ffa5e commit d00faf9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/galaxy/tool_util/deps/resolvers/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ def unused_dependency_paths(self, toolbox_requirements_status):
dir_contents = set(
os.listdir(self.conda_context.envs_path) if os.path.exists(self.conda_context.envs_path) else []
)
# never delete Galaxy's conda env
used_paths.add("_galaxy_")
unused_paths = dir_contents.difference(used_paths) # New set with paths in dir_contents but not in used_paths
unused_paths = [os.path.join(self.conda_context.envs_path, p) for p in unused_paths]
return unused_paths
Expand Down

0 comments on commit d00faf9

Please sign in to comment.