When a module defines a N-module requirement, if one of these module loads successfully the requirement is satisfied.
However, if one module fails then one of the other succeed to load, an error exit code is still set.
$ cat /path/to/modulefiles/quz
#%Module
break
$ cat /path/to/modulefiles/bar
#%Module
$ cat /path/to/modulefiles/foo
#%Module
prereq quz bar
$ ml use /path/to/modulefiles
$ ml foo
Loading foo
Loading requirement: bar
$ echo $?
1
No error exit code should be set as one module satisfying the requirement has been loaded.