cea-hpc / modules

Environment Modules: provides dynamic modification of a user's environment
http://modules.sourceforge.net/
GNU General Public License v2.0
668 stars 102 forks source link

Module not found error message reported whereas an alternative requirement is loaded #511

Closed xdelaruelle closed 9 months ago

xdelaruelle commented 9 months ago

When a module requirement is made of 2 alternatives, if the first alternative cannot be found but the second correctly loads an error message is still reported.

$ cat /path/to/modulefiles/bar
#%Module
$ cat /path/to/modulefiles/foo
#%Module
prereq unk bar
$ ml use /path/to/modulefiles
$ ml foo
Loading foo
  ERROR: Unable to locate a modulefile for 'unk'
  Loading requirement: bar

Error message should not be reported as the alternative requirement bar is successfully loaded after unk not being found.