summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMicheal Quinn <quinnm@missouri.edu>2018-04-18 09:12:17 -0500
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2018-08-07 19:56:11 +0200
commitd163be6a13b91a5c5b836ddad449a86ec9f55923 (patch)
tree7dbb9f7ac824d99bfe077df68252834d90588b40 /share
parent3301e21f06b918321e7471f8aaed997ee453f5b1 (diff)
downloadspack-d163be6a13b91a5c5b836ddad449a86ec9f55923.tar.gz
spack-d163be6a13b91a5c5b836ddad449a86ec9f55923.tar.bz2
spack-d163be6a13b91a5c5b836ddad449a86ec9f55923.tar.xz
spack-d163be6a13b91a5c5b836ddad449a86ec9f55923.zip
Adding logic to the autoload if statement so it only fire if the module is being loaded.
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 %}