Skip to content

Commit

Permalink
add Lmod version stmt when doing --trace
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Jan 14, 2019
1 parent 937b8c1 commit cdf812f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.new
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ Lmod 7.8+
(7.8.11) Allow MODULERCFILE to be a colon separated list with the priority be left to right instead of right to left.
(7.8.12) added cc test case for issues with choosing the correct module when doing reloadAll()
(7.8.13) issue #394: Only reload modules when the userName has remained the same in mt.
(7.8.14) Add Lmod version report to --trace output.

6 changes: 3 additions & 3 deletions rt/common_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ EPOCH()
initStdEnvVars()
{
while IFS='=' read -r name value; do
if [ $name = "LMOD_CMD" ] || [ $name = "LMOD_DIR" ]; then
if [ "$name" = "LMOD_CMD" ] || [ "$name" = "LMOD_DIR" ]; then
:
elif [[ $name =~ ^__LMOD_REF_COUNT.* ]]; then
elif [[ "$name" =~ ^__LMOD_REF_COUNT.* ]]; then
unset $name
elif [[ $name =~ ^LMOD.* ]]; then
elif [[ "$name" =~ ^LMOD.* ]]; then
unset $name
fi
done < <(env)
Expand Down
3 changes: 3 additions & 0 deletions src/lmod.in.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ function main()
local tracing = cosmic:value("LMOD_TRACING")
if (tracing == "yes" ) then
local a = {}
a[#a + 1] = "Lmod version: "
a[#a + 1] = Version.name()
a[#a + 1] = "\n"
a[#a + 1] = "running: module "
a[#a + 1] = concatTbl(arg," ")
a[#a + 1] = "\n"
Expand Down

0 comments on commit cdf812f

Please sign in to comment.