Skip to content

Commit cdf812f

Browse files
author
Robert McLay
committed
add Lmod version stmt when doing --trace
1 parent 937b8c1 commit cdf812f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.new

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ Lmod 7.8+
1919
(7.8.11) Allow MODULERCFILE to be a colon separated list with the priority be left to right instead of right to left.
2020
(7.8.12) added cc test case for issues with choosing the correct module when doing reloadAll()
2121
(7.8.13) issue #394: Only reload modules when the userName has remained the same in mt.
22+
(7.8.14) Add Lmod version report to --trace output.
23+

rt/common_funcs.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ EPOCH()
197197
initStdEnvVars()
198198
{
199199
while IFS='=' read -r name value; do
200-
if [ $name = "LMOD_CMD" ] || [ $name = "LMOD_DIR" ]; then
200+
if [ "$name" = "LMOD_CMD" ] || [ "$name" = "LMOD_DIR" ]; then
201201
:
202-
elif [[ $name =~ ^__LMOD_REF_COUNT.* ]]; then
202+
elif [[ "$name" =~ ^__LMOD_REF_COUNT.* ]]; then
203203
unset $name
204-
elif [[ $name =~ ^LMOD.* ]]; then
204+
elif [[ "$name" =~ ^LMOD.* ]]; then
205205
unset $name
206206
fi
207207
done < <(env)

src/lmod.in.lua

+3
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ function main()
396396
local tracing = cosmic:value("LMOD_TRACING")
397397
if (tracing == "yes" ) then
398398
local a = {}
399+
a[#a + 1] = "Lmod version: "
400+
a[#a + 1] = Version.name()
401+
a[#a + 1] = "\n"
399402
a[#a + 1] = "running: module "
400403
a[#a + 1] = concatTbl(arg," ")
401404
a[#a + 1] = "\n"

0 commit comments

Comments
 (0)