Skip to content

Commit ce7cdf8

Browse files
authored
Merge pull request #3816 from boegel/tmod
pick up $MODULES_CMD to facilitate using Environment Modules 4.x as modules tool
2 parents 2768d12 + e51c5f9 commit ce7cdf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easybuild/tools/modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ def __init__(self, mod_paths=None, testing=False):
187187
self.cmd = env_cmd_path
188188
self.log.debug("Set %s command via environment variable %s: %s",
189189
self.NAME, self.COMMAND_ENVIRONMENT, self.cmd)
190-
# check whether paths obtained via $PATH and $LMOD_CMD are different
191190
elif cmd_path != env_cmd_path:
192191
self.log.debug("Different paths found for %s command '%s' via which/$PATH and $%s: %s vs %s",
193192
self.NAME, self.COMMAND, self.COMMAND_ENVIRONMENT, cmd_path, env_cmd_path)
@@ -1315,6 +1314,7 @@ class EnvironmentModules(EnvironmentModulesTcl):
13151314
"""Interface to environment modules 4.0+"""
13161315
NAME = "Environment Modules v4"
13171316
COMMAND = os.path.join(os.getenv('MODULESHOME', 'MODULESHOME_NOT_DEFINED'), 'libexec', 'modulecmd.tcl')
1317+
COMMAND_ENVIRONMENT = 'MODULES_CMD'
13181318
REQ_VERSION = '4.0.0'
13191319
MAX_VERSION = None
13201320
VERSION_REGEXP = r'^Modules\s+Release\s+(?P<version>\d\S*)\s'

0 commit comments

Comments
 (0)