From a49b9f27ed63c8711b2a86cbb48b8369c41d07b4 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 3 Sep 2024 15:40:17 +0200 Subject: [PATCH] add miniforge3 to prefix search --- lib/galaxy/tool_util/deps/conda_util.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/lib/galaxy/tool_util/deps/conda_util.py b/lib/galaxy/tool_util/deps/conda_util.py index 19550602ed83..bc7077c9673f 100644 --- a/lib/galaxy/tool_util/deps/conda_util.py +++ b/lib/galaxy/tool_util/deps/conda_util.py @@ -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):