Closed vanderwb closed 3 months ago
Thanks for the bug report with example test. This helps a great deal. Some packages do something special with an trailing delimiter. LUA env. vars do. So does tex/latex TEXINPUTS. So this cleaning up of trailing delimiters can not be done for all variables. So Lmod now removes extra delimiters for just PATH, LD_LIBRARY_PATH and MODULEPATH.
Please try the testing branch to see if it works for you. Thanks!
Apologies @rtmclay... I just realized I never got back to you after testing this! The change works great. Can LIBRARY_PATH
be added to the list of vars to clean up? Other than that, it'd be great to get this into the next Lmod release.
Sure. cleaning up LIBRARY_PATH is now added and will be part of the next release.
Test out the release of Lmod 8.7.39 to see if this solves your issue.
Closing this issue. You can re-open this issue if necessary
Describe the bug If a module prepends (or appends, presumably) a path that ends with the separator character, it seems to cause a syntax error in the spider cache, which then causes a (non-fatal) error when running commands like
module avail
. Here is an example module command:Note the colon separator at the end of the path. The cache ends up with this entry for the module:
Since this isn't valid syntax, running commands which interrogate the cache produce this error:
The prepend_path statement obviously isn't very well constructed, but it can happen, so if Lmod could handle this scenario better it would be great. I ran into this because the Spack package manager was auto-generating modules with a statement like the above. I will also submit a PR to resolve that particular problem with Spack.
To Reproduce I've attached a simple reproducer, to be executed with:
Desktop (please complete the following information):