From d163be6a13b91a5c5b836ddad449a86ec9f55923 Mon Sep 17 00:00:00 2001 From: Micheal Quinn Date: Wed, 18 Apr 2018 09:12:17 -0500 Subject: Adding logic to the autoload if statement so it only fire if the module is being loaded. --- share/spack/templates/modules/modulefile.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/spack/templates/modules/modulefile.tcl b/share/spack/templates/modules/modulefile.tcl index 833d8bf6c2..597dd95206 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 ![ is-loaded {{ module }} ] {{ '{' }} +if { [ module-info mode load ] && ![ is-loaded {{ module }} ] } {{ '{' }} {% if verbose %} puts stderr "Autoloading {{ module }}" {% endif %} -- cgit v1.2.3-60-g2f50