summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2022-10-06 20:15:28 +0200
committerGitHub <noreply@github.com>2022-10-06 20:15:28 +0200
commita520a7ef284ca7788f1c26d0bb26ea901a2080a7 (patch)
treeffe8cdc658128022e3433cfa14b00caa96d7bacb /share
parentc3018f95ee5451550427446efc5c72ef70bcd690 (diff)
downloadspack-a520a7ef284ca7788f1c26d0bb26ea901a2080a7.tar.gz
spack-a520a7ef284ca7788f1c26d0bb26ea901a2080a7.tar.bz2
spack-a520a7ef284ca7788f1c26d0bb26ea901a2080a7.tar.xz
spack-a520a7ef284ca7788f1c26d0bb26ea901a2080a7.zip
tcl module template: automatically unload automatically loaded modules (#32853)
Remove `module-info mode load` condition that prevents auto-unloading when autoloading is enabled. It looks like this condition was added to work around an issue in environment-modules that is no longer necessary. Add quotes to make is-loaded happy
Diffstat (limited to 'share')
-rw-r--r--share/spack/templates/modules/modulefile.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/spack/templates/modules/modulefile.tcl b/share/spack/templates/modules/modulefile.tcl
index 21dacfedc0..0c11f7c106 100644
--- a/share/spack/templates/modules/modulefile.tcl
+++ b/share/spack/templates/modules/modulefile.tcl
@@ -23,7 +23,7 @@ proc ModulesHelp { } {
{% block autoloads %}
{% for module in autoload %}
-if {{ '{' }} [ module-info mode load ] && ![ is-loaded {{ module }} ] {{ '}' }} {{ '{' }}
+if {{ '{' }} ![ is-loaded '{{ module }}' ] {{ '}' }} {{ '{' }}
{% if verbose %}
puts stderr "Autoloading {{ module }}"
{% endif %}