Some use case of the getenv modulefile command:
set _modules_home [getenv MODULESHOME]
source ${_modules_home}/common
Leads to error when displaying modulefile:
$ module display mod
-------------------------------------------------------------------
/path/to/mod:
Module ERROR: couldn't read file "$MODULESHOME/common": no such file or directory
while executing
"source "${_modules_home}/common"
(file "/path/to/mod" line 8)
Please contact <root@localhost>
-------------------------------------------------------------------
On display mode, getenv returns the variable name which leads to such error as the value is expected to fully resolve string value.
Some use case of the
getenvmodulefile command:Leads to error when displaying modulefile:
On display mode,
getenvreturns the variable name which leads to such error as the value is expected to fully resolve string value.