From cdf812f64dc6c73c3ea6856b15db2744fe16a069 Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Mon, 14 Jan 2019 13:30:08 -0600 Subject: [PATCH] add Lmod version stmt when doing --trace --- README.new | 2 ++ rt/common_funcs.sh | 6 +++--- src/lmod.in.lua | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.new b/README.new index ca725a4a2..44001ca6e 100644 --- a/README.new +++ b/README.new @@ -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. + diff --git a/rt/common_funcs.sh b/rt/common_funcs.sh index 9394067d9..54fa8e634 100644 --- a/rt/common_funcs.sh +++ b/rt/common_funcs.sh @@ -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) diff --git a/src/lmod.in.lua b/src/lmod.in.lua index a7e5c087e..e38415d8b 100644 --- a/src/lmod.in.lua +++ b/src/lmod.in.lua @@ -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"