We have a function prepend_module_path with an optional priority. Hence if we don't pass a priority then this function will not "prepend" the path
Especially for LMod we should not use the priority at all. Instead we can simply implement use, unuse and prepend by modifying MODULEPATH as is done for use in #3557
Note: As a side-effect from #3557 prepend_module_path without a priority is already working as it should now.
See https://github.com/easybuilders/easybuild-framework/pull/3557, especially:
Especially for LMod we should not use the priority at all. Instead we can simply implement use, unuse and prepend by modifying MODULEPATH as is done for
use
in #3557Note: As a side-effect from #3557 prepend_module_path without a priority is already working as it should now.