Files
modules/testsuite/modulefiles/module/lerr
Xavier Delaruelle b88651f570 Failed load/unload if submod load/unload fails
When a modulefile loads or unloads another modulefile, load or unload
issue did not previously led to upper module load or unload failure. As
a result, the upper modulefile appeared loaded or unloaded whereas its
dependent sub-modulefile were not loaded or respectively still loaded.

This commit makes cmdModuleLoad and cmdModuleUnload procedure return an
exit code to let know if load or unload action performed correctly. In
case of a 'module load' or 'module unload' call within a modulefile, the
module procedure will raise an error with the dummy message
'SUB_FAILED'. This message is caught at the result of the modulefile
interpretation to return an error code, without raising error count or
message as it has already been handled at the root of the issue.
2017-09-04 09:17:25 +02:00

29 lines
647 B
Plaintext

#%Module1.0
##############################################################################
# Modules Revision 3.0
# Providing a flexible user environment
#
# File: module/%M%
# Revision: %I%
# First Edition: 2017/09/03
# Last Mod.: %U%, %G%
#
# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr
#
# Description: Testuite modulefile
# Command:
# Sub-Command: module
#
# Invocation:
# Result: %R{
# }R%
# Comment: %C{
# Checks the recursive invocation of module with sub-modulefile
# raising error
# }C%
#
##############################################################################
module load module/err