summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
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 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 %}