modulefile: shell init file must be sourced while loading

This commit is contained in:
2022-06-09 11:59:09 +02:00
parent 5e01557aad
commit 38cd9b1583
+5 -3
View File
@@ -10,9 +10,8 @@ Pmodules are a hierarchical module environment based on Environment Modules.
"
#
# It might be that '${PMODULES_HOME}' is in PATH.
# Why? With older version the PATH might have been set without loading
# a module.
# Older versions add '$PREFIX/bin' to PATH without loading Pmodules as
# a module. Remove it ...
#
if { [module-info mode load] } {
set PATH ":$::env(PATH):"
@@ -22,3 +21,6 @@ if { [module-info mode load] } {
}
}
}
set shell [module-info shell]
puts "source \"$PREFIX/init/$shell\""