$ export BASH_ENV=$HOME/lmod/5.6.2/init/bash
$ export EASYBUILD_MODULES_TOOL=EnvironmentModulesC
$ type module
module is a function
module ()
{
eval `/Users/kehoste/.local/environment-modules/Modules/$MODULE_VERSION/bin/modulecmd bash $*`
}
$ python -m test.framework.modules
...
EasyBuildError: 'EasyBuild crashed with an error (at easybuild/tools/modules.py:247 in
check_module_function): pattern \'.*modulecmd\' (EnvironmentModulesC) not found in
defined \'module\' function.\nSpecify the correct modules tool to avoid weird problems
due to this mismatch, see the --modules-tool and --avail-modules-tools command line
options.\nOr alternatively, use --allow-modules-tool-mismatch to stop treating this as
an error. Obtained definition of \'module\' function: module is a function\nmodule () \n
{ \n eval $($LMOD_CMD bash "$@");\n [ $? = 0 ] && eval $(${LMOD_SETTARG_CMD:-:} -s
sh)\n}\n'
This occurs because commands run by EasyBuild are being run in a subshell, as a bash script...
So, we should unset $BASH_ENV, probably in main.py?
@pforai: would that suffice, or do we have to make sure it's undefined for every command we run (because it may get redefined?!)
to reproduce this:
This occurs because commands run by EasyBuild are being run in a subshell, as a bash script...
So, we should unset
$BASH_ENV
, probably inmain.py
? @pforai: would that suffice, or do we have to make sure it's undefined for every command we run (because it may get redefined?!)