Skip to content

Commit

Permalink
add miniforge3 to prefix search
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Sep 3, 2024
1 parent c778a2a commit a49b9f2
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions lib/galaxy/tool_util/deps/conda_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,11 @@ def find_conda_prefix() -> str:
for Miniconda installs.
"""
home = os.path.expanduser("~")
miniconda_2_dest = os.path.join(home, "miniconda2")
miniconda_3_dest = os.path.join(home, "miniconda3")
anaconda_2_dest = os.path.join(home, "anaconda2")
anaconda_3_dest = os.path.join(home, "anaconda3")
# Prefer miniconda3 install if both available
if os.path.exists(miniconda_3_dest):
return miniconda_3_dest
elif os.path.exists(miniconda_2_dest):
return miniconda_2_dest
elif os.path.exists(anaconda_3_dest):
return anaconda_3_dest
elif os.path.exists(anaconda_2_dest):
return anaconda_2_dest
else:
return miniconda_3_dest
destinations = ["miniforge3", "miniconda3", "miniconda2", "anaconda3", "anaconda2"]
for destination in destinations:
if os.path.exists(destination):
return destination
return "miniforge3"


class CondaContext(installable.InstallableContext):
Expand Down

0 comments on commit a49b9f2

Please sign in to comment.