modules
modules copied to clipboard
Allow modules to ommit exit 1 calls to mimik modules 3 behaviour
Describe the solution you'd like
Hey Xavier, I again have one of those nice requests :) We'd need to be able to turn off exit codes for modules, like it was in modules 3
Something like this maybe in
proc cleanupAndExit {code} {
....
if {![getState inhibit_errreport]} {
exit $code
} else { exit 0 }
}
Describe alternatives you've considered
Seems nothing from siteconfig can influence this behavior, correct?
Thanks and BR Seb
Hi @wenzler
Do you mean to get 0
exit code and the end of modulecmd.tcl code evaluation even if an error occurs ?
For instance:
$ module load unknown_module
ERROR: Unable to locate a modulefile for 'unknown_module'
$ echo $?
0
Yes, exactly
In siteconfig.tcl
you may set the false_rendered
state to indicate the shell code for exit code has already been produced:
setState false_rendered 1
Works - thanks a lot!
Maybe something for the cookbook then? etc/siteconfig.tcl:
if {[info exists ::env(MODULES_NO_EXITCODES)]} { setState false_rendered 1 }
Maybe something for the cookbook then? etc/siteconfig.tcl:
if {[info exists ::env(MODULES_NO_EXITCODES)]} { setState false_rendered 1 }
This is not something I will work on, but I will accept such cookbook entry as contribution.