From a520a7ef284ca7788f1c26d0bb26ea901a2080a7 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Thu, 6 Oct 2022 20:15:28 +0200 Subject: 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 --- share/spack/templates/modules/modulefile.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') 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 %} -- cgit v1.2.3-60-g2f50