Skip to content

Conversation

@Flamefire
Copy link
Contributor

This is a cleanup based on #3636

During that I found 2 bugs in our current LMod ModulesTool implementation:

  1. In add_module_path the paths must be normalized to compare against a normalized path
  2. When adding a path with a priority the priority might be ignored if the path is currently at the front of $MODULEPATH which can cause other paths to take priority

Additionally I introduced a warning when prepending a module path that doesn't end up at the front as the name suggested. I limit this to cases without any priorities (in effect or new) or when using a new priority

Lmod ignores if a path exists so we should be able to do the same
Introduce _set_module_path which correctly handles empty paths and empty lists
with proper logging
When adding a path with a priority which is already at the front
we need to run the module command anyway to apply the priority or it can
be overriden by subsequent additions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant