We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Conda generic easyblock doesn't recognise Miniforge
When using Miniforge3 instead of Miniconda3 (created via [https://github.com/easybuilders/easybuild-easyconfigs/pull/20227](https://github.com/easybuilders/easybuild-easyconfigs/pull/20227)) the block does not identify that this is a viable conda environment.

The reported error in the logs is:

```
EasyBuild crashed with an error (at easybuild/base/exceptions.py:126 in __init__): No conda/mamba/micromamba available. (at easybuild/easyblocks/generic/conda.py:72 in install_step)
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `easybuild/easyblocks/generic/conda.py`
Content:
```
1 ##
2 # Copyright 2009-2023 Ghent University
3 #
4 # This file is part of EasyBuild,
5 # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6 # with support of Ghent University (http://ugent.be/hpc),
7 # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
8 # Flemish Research Foundation (FWO) (http://www.fwo.be/en)
9 # and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10 #
11 # https://github.com/easybuilders/easybuild
12 #
13 # EasyBuild is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation v2.
16 #
17 # EasyBuild is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.
24 ##
25 """
26 EasyBuild support for installing software using 'conda', implemented as an easyblock.
27 
28 @author: Jillian Rowe (New York University Abu Dhabi)
29 @author: Kenneth Hoste (HPC-UGent)
30 """
31 
32 import os
33 
34 from easybuild.easyblocks.generic.binary import Binary
35 from easybuild.framework.easyconfig import CUSTOM
36 from easybuild.tools.run import run_cmd
37 from easybuild.tools.modules import get_software_root
38 from easybuild.tools.build_log import EasyBuildError
39 
40 
41 class Conda(Binary):
42     """Support for installing software using 'conda'."""
43 
44     @staticmethod
45     def extra_options(extra_vars=None):
46         """Extra easyconfig parameters specific to Conda easyblock."""
47         extra_vars = Binary.extra_options(extra_vars)
48         extra_vars.update({
49             'channels': [None, "List of conda channels to pass to 'conda install'", CUSTOM],
50             'environment_file': [None, "Conda environment.yml file to use with 'conda env create'", CUSTOM],
51             'remote_environment': [None, "Remote conda environment to use with 'conda env create'", CUSTOM],
52             'requirements': [None, "Requirements specification to pass to 'conda install'", CUSTOM],
53         })
54         return extra_vars
55 
56     def extract_step(self):
57         """Copy sources via extract_step of parent, if any are specified."""
58         if self.src:
59             super(Conda, self).extract_step()
60 
61     def install_step(self):
62         """Install software using 'conda env create' or 'conda create' & 'conda install'
63         (or the 'mamba', etc., equivalent)."""
64         if (get_software_root('anaconda2') or get_software_root('miniconda2') or
65                 get_software_root('anaconda3') or get_software_root('miniconda3')):
66             conda_cmd = 'conda'
67         elif get_software_root('mamba'):
68             conda_cmd = 'mamba'
69         elif get_software_root('micromamba'):
70             conda_cmd = 'micromamba'
71         else:
72             raise EasyBuildError("No conda/mamba/micromamba available.")
73 
74         # initialize conda environment
75         # setuptools is just a choice, but *something* needs to be there
76         cmd = "%s config --add create_default_packages setuptools" % conda_cmd
77         run_cmd(cmd, log_all=True, simple=True)
78 
79         if self.cfg['environment_file'] or self.cfg['remote_environment']:
80 
81             if self.cfg['environment_file']:
82                 env_spec = '-f ' + self.cfg['environment_file']
83             else:
84                 env_spec = self.cfg['remote_environment']
85 
86             # use --force to ignore existing installation directory
87             cmd = "%s %s env create --force %s -p %s" % (self.cfg['preinstallopts'], conda_cmd,
88                                                          env_spec, self.installdir)
89             run_cmd(cmd, log_all=True, simple=True)
90 
91         else:
92 
93             if self.cfg['requirements']:
94 
95                 install_args = "-y %s " % self.cfg['requirements']
96                 if self.cfg['channels']:
97                     install_args += ' '.join('-c ' + chan for chan in self.cfg['channels'])
98 
99                 self.log.info("Installed conda requirements")
100 
101             cmd = "%s %s create --force -y -p %s %s" % (self.cfg['preinstallopts'], conda_cmd,
102                                                         self.installdir, install_args)
103             run_cmd(cmd, log_all=True, simple=True)
104 
105         # clean up
106         cmd = "%s clean -ya" % conda_cmd
107         run_cmd(cmd, log_all=True, simple=True)
108 
109     def make_module_extra(self):
110         """Add the install directory to the PATH."""
111         txt = super(Conda, self).make_module_extra()
112         txt += self.module_generator.set_environment('CONDA_ENV', self.installdir)
113         txt += self.module_generator.set_environment('CONDA_PREFIX', self.installdir)
114         txt += self.module_generator.set_environment('CONDA_DEFAULT_ENV', self.installdir)
115         self.log.debug("make_module_extra added this: %s", txt)
116         return txt
117 
118     def make_module_req_guess(self):
119         """
120         A dictionary of possible directories to look for.
121         """
122         # LD_LIBRARY_PATH issue discusses here
123         # http://superuser.com/questions/980250/environment-module-cannot-initialize-tcl
124         return {
125             'PATH': ['bin', 'sbin'],
126             'MANPATH': ['man', os.path.join('share', 'man')],
127             'PKG_CONFIG_PATH': [os.path.join(x, 'pkgconfig') for x in ['lib', 'lib32', 'lib64', 'share']],
128         }
129
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/easybuild/easyblocks/generic/conda.py b/easybuild/easyblocks/generic/conda.py
--- a/easybuild/easyblocks/generic/conda.py
+++ b/easybuild/easyblocks/generic/conda.py
@@ -62,7 +62,8 @@
         """Install software using 'conda env create' or 'conda create' & 'conda install'
         (or the 'mamba', etc., equivalent)."""
         if (get_software_root('anaconda2') or get_software_root('miniconda2') or
-                get_software_root('anaconda3') or get_software_root('miniconda3')):
+                get_software_root('anaconda3') or get_software_root('miniconda3') or
+                get_software_root('miniforge3')):
             conda_cmd = 'conda'
         elif get_software_root('mamba'):
             conda_cmd = 'mamba'

{"golden_diff": "diff --git a/easybuild/easyblocks/generic/conda.py b/easybuild/easyblocks/generic/conda.py\n--- a/easybuild/easyblocks/generic/conda.py\n+++ b/easybuild/easyblocks/generic/conda.py\n@@ -62,7 +62,8 @@\n         \"\"\"Install software using 'conda env create' or 'conda create' & 'conda install'\n         (or the 'mamba', etc., equivalent).\"\"\"\n         if (get_software_root('anaconda2') or get_software_root('miniconda2') or\n-                get_software_root('anaconda3') or get_software_root('miniconda3')):\n+                get_software_root('anaconda3') or get_software_root('miniconda3') or\n+                get_software_root('miniforge3')):\n             conda_cmd = 'conda'\n         elif get_software_root('mamba'):\n             conda_cmd = 'mamba'\n", "issue": "Conda generic easyblock doesn't recognise Miniforge\nWhen using Miniforge3 instead of Miniconda3 (created via [https://github.com/easybuilders/easybuild-easyconfigs/pull/20227](https://github.com/easybuilders/easybuild-easyconfigs/pull/20227)) the block does not identify that this is a viable conda environment.\r\n\r\nThe reported error in the logs is:\r\n\r\n```\r\nEasyBuild crashed with an error (at easybuild/base/exceptions.py:126 in __init__): No conda/mamba/micromamba available. (at easybuild/easyblocks/generic/conda.py:72 in install_step)\r\n```\n", "before_files": [{"content": "##\n# Copyright 2009-2023 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemish Research Foundation (FWO) (http://www.fwo.be/en)\n# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).\n#\n# https://github.com/easybuilders/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation v2.\n#\n# EasyBuild is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.\n##\n\"\"\"\nEasyBuild support for installing software using 'conda', implemented as an easyblock.\n\n@author: Jillian Rowe (New York University Abu Dhabi)\n@author: Kenneth Hoste (HPC-UGent)\n\"\"\"\n\nimport os\n\nfrom easybuild.easyblocks.generic.binary import Binary\nfrom easybuild.framework.easyconfig import CUSTOM\nfrom easybuild.tools.run import run_cmd\nfrom easybuild.tools.modules import get_software_root\nfrom easybuild.tools.build_log import EasyBuildError\n\n\nclass Conda(Binary):\n    \"\"\"Support for installing software using 'conda'.\"\"\"\n\n    @staticmethod\n    def extra_options(extra_vars=None):\n        \"\"\"Extra easyconfig parameters specific to Conda easyblock.\"\"\"\n        extra_vars = Binary.extra_options(extra_vars)\n        extra_vars.update({\n            'channels': [None, \"List of conda channels to pass to 'conda install'\", CUSTOM],\n            'environment_file': [None, \"Conda environment.yml file to use with 'conda env create'\", CUSTOM],\n            'remote_environment': [None, \"Remote conda environment to use with 'conda env create'\", CUSTOM],\n            'requirements': [None, \"Requirements specification to pass to 'conda install'\", CUSTOM],\n        })\n        return extra_vars\n\n    def extract_step(self):\n        \"\"\"Copy sources via extract_step of parent, if any are specified.\"\"\"\n        if self.src:\n            super(Conda, self).extract_step()\n\n    def install_step(self):\n        \"\"\"Install software using 'conda env create' or 'conda create' & 'conda install'\n        (or the 'mamba', etc., equivalent).\"\"\"\n        if (get_software_root('anaconda2') or get_software_root('miniconda2') or\n                get_software_root('anaconda3') or get_software_root('miniconda3')):\n            conda_cmd = 'conda'\n        elif get_software_root('mamba'):\n            conda_cmd = 'mamba'\n        elif get_software_root('micromamba'):\n            conda_cmd = 'micromamba'\n        else:\n            raise EasyBuildError(\"No conda/mamba/micromamba available.\")\n\n        # initialize conda environment\n        # setuptools is just a choice, but *something* needs to be there\n        cmd = \"%s config --add create_default_packages setuptools\" % conda_cmd\n        run_cmd(cmd, log_all=True, simple=True)\n\n        if self.cfg['environment_file'] or self.cfg['remote_environment']:\n\n            if self.cfg['environment_file']:\n                env_spec = '-f ' + self.cfg['environment_file']\n            else:\n                env_spec = self.cfg['remote_environment']\n\n            # use --force to ignore existing installation directory\n            cmd = \"%s %s env create --force %s -p %s\" % (self.cfg['preinstallopts'], conda_cmd,\n                                                         env_spec, self.installdir)\n            run_cmd(cmd, log_all=True, simple=True)\n\n        else:\n\n            if self.cfg['requirements']:\n\n                install_args = \"-y %s \" % self.cfg['requirements']\n                if self.cfg['channels']:\n                    install_args += ' '.join('-c ' + chan for chan in self.cfg['channels'])\n\n                self.log.info(\"Installed conda requirements\")\n\n            cmd = \"%s %s create --force -y -p %s %s\" % (self.cfg['preinstallopts'], conda_cmd,\n                                                        self.installdir, install_args)\n            run_cmd(cmd, log_all=True, simple=True)\n\n        # clean up\n        cmd = \"%s clean -ya\" % conda_cmd\n        run_cmd(cmd, log_all=True, simple=True)\n\n    def make_module_extra(self):\n        \"\"\"Add the install directory to the PATH.\"\"\"\n        txt = super(Conda, self).make_module_extra()\n        txt += self.module_generator.set_environment('CONDA_ENV', self.installdir)\n        txt += self.module_generator.set_environment('CONDA_PREFIX', self.installdir)\n        txt += self.module_generator.set_environment('CONDA_DEFAULT_ENV', self.installdir)\n        self.log.debug(\"make_module_extra added this: %s\", txt)\n        return txt\n\n    def make_module_req_guess(self):\n        \"\"\"\n        A dictionary of possible directories to look for.\n        \"\"\"\n        # LD_LIBRARY_PATH issue discusses here\n        # http://superuser.com/questions/980250/environment-module-cannot-initialize-tcl\n        return {\n            'PATH': ['bin', 'sbin'],\n            'MANPATH': ['man', os.path.join('share', 'man')],\n            'PKG_CONFIG_PATH': [os.path.join(x, 'pkgconfig') for x in ['lib', 'lib32', 'lib64', 'share']],\n        }\n", "path": "easybuild/easyblocks/generic/conda.py"}], "after_files": [{"content": "##\n# Copyright 2009-2023 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemish Research Foundation (FWO) (http://www.fwo.be/en)\n# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).\n#\n# https://github.com/easybuilders/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation v2.\n#\n# EasyBuild is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.\n##\n\"\"\"\nEasyBuild support for installing software using 'conda', implemented as an easyblock.\n\n@author: Jillian Rowe (New York University Abu Dhabi)\n@author: Kenneth Hoste (HPC-UGent)\n\"\"\"\n\nimport os\n\nfrom easybuild.easyblocks.generic.binary import Binary\nfrom easybuild.framework.easyconfig import CUSTOM\nfrom easybuild.tools.run import run_cmd\nfrom easybuild.tools.modules import get_software_root\nfrom easybuild.tools.build_log import EasyBuildError\n\n\nclass Conda(Binary):\n    \"\"\"Support for installing software using 'conda'.\"\"\"\n\n    @staticmethod\n    def extra_options(extra_vars=None):\n        \"\"\"Extra easyconfig parameters specific to Conda easyblock.\"\"\"\n        extra_vars = Binary.extra_options(extra_vars)\n        extra_vars.update({\n            'channels': [None, \"List of conda channels to pass to 'conda install'\", CUSTOM],\n            'environment_file': [None, \"Conda environment.yml file to use with 'conda env create'\", CUSTOM],\n            'remote_environment': [None, \"Remote conda environment to use with 'conda env create'\", CUSTOM],\n            'requirements': [None, \"Requirements specification to pass to 'conda install'\", CUSTOM],\n        })\n        return extra_vars\n\n    def extract_step(self):\n        \"\"\"Copy sources via extract_step of parent, if any are specified.\"\"\"\n        if self.src:\n            super(Conda, self).extract_step()\n\n    def install_step(self):\n        \"\"\"Install software using 'conda env create' or 'conda create' & 'conda install'\n        (or the 'mamba', etc., equivalent).\"\"\"\n        if (get_software_root('anaconda2') or get_software_root('miniconda2') or\n                get_software_root('anaconda3') or get_software_root('miniconda3') or\n                get_software_root('miniforge3')):\n            conda_cmd = 'conda'\n        elif get_software_root('mamba'):\n            conda_cmd = 'mamba'\n        elif get_software_root('micromamba'):\n            conda_cmd = 'micromamba'\n        else:\n            raise EasyBuildError(\"No conda/mamba/micromamba available.\")\n\n        # initialize conda environment\n        # setuptools is just a choice, but *something* needs to be there\n        cmd = \"%s config --add create_default_packages setuptools\" % conda_cmd\n        run_cmd(cmd, log_all=True, simple=True)\n\n        if self.cfg['environment_file'] or self.cfg['remote_environment']:\n\n            if self.cfg['environment_file']:\n                env_spec = '-f ' + self.cfg['environment_file']\n            else:\n                env_spec = self.cfg['remote_environment']\n\n            # use --force to ignore existing installation directory\n            cmd = \"%s %s env create --force %s -p %s\" % (self.cfg['preinstallopts'], conda_cmd,\n                                                         env_spec, self.installdir)\n            run_cmd(cmd, log_all=True, simple=True)\n\n        else:\n\n            if self.cfg['requirements']:\n\n                install_args = \"-y %s \" % self.cfg['requirements']\n                if self.cfg['channels']:\n                    install_args += ' '.join('-c ' + chan for chan in self.cfg['channels'])\n\n                self.log.info(\"Installed conda requirements\")\n\n            cmd = \"%s %s create --force -y -p %s %s\" % (self.cfg['preinstallopts'], conda_cmd,\n                                                        self.installdir, install_args)\n            run_cmd(cmd, log_all=True, simple=True)\n\n        # clean up\n        cmd = \"%s clean -ya\" % conda_cmd\n        run_cmd(cmd, log_all=True, simple=True)\n\n    def make_module_extra(self):\n        \"\"\"Add the install directory to the PATH.\"\"\"\n        txt = super(Conda, self).make_module_extra()\n        txt += self.module_generator.set_environment('CONDA_ENV', self.installdir)\n        txt += self.module_generator.set_environment('CONDA_PREFIX', self.installdir)\n        txt += self.module_generator.set_environment('CONDA_DEFAULT_ENV', self.installdir)\n        self.log.debug(\"make_module_extra added this: %s\", txt)\n        return txt\n\n    def make_module_req_guess(self):\n        \"\"\"\n        A dictionary of possible directories to look for.\n        \"\"\"\n        # LD_LIBRARY_PATH issue discusses here\n        # http://superuser.com/questions/980250/environment-module-cannot-initialize-tcl\n        return {\n            'PATH': ['bin', 'sbin'],\n            'MANPATH': ['man', os.path.join('share', 'man')],\n            'PKG_CONFIG_PATH': [os.path.join(x, 'pkgconfig') for x in ['lib', 'lib32', 'lib64', 'share']],\n        }\n", "path": "easybuild/easyblocks/generic/conda.py"}]}