diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-01-12 14:29:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 13:29:22 +0000 |
commit | c8e01752a1268ec888cd55d822aaf94d96467f31 (patch) | |
tree | b65a6bc8859ab3b4a346f0bec628566a7e00f38b /share | |
parent | 640a4f7dcd236fb2658476989ba997922a3d4472 (diff) | |
download | spack-c8e01752a1268ec888cd55d822aaf94d96467f31.tar.gz spack-c8e01752a1268ec888cd55d822aaf94d96467f31.tar.bz2 spack-c8e01752a1268ec888cd55d822aaf94d96467f31.tar.xz spack-c8e01752a1268ec888cd55d822aaf94d96467f31.zip |
Use depends_on over load in lmod module files generated by Spack (#28352)
Diffstat (limited to 'share')
-rw-r--r-- | share/spack/templates/modules/modulefile.lua | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/share/spack/templates/modules/modulefile.lua b/share/spack/templates/modules/modulefile.lua index 2149c8bfaf..e4b589d7dc 100644 --- a/share/spack/templates/modules/modulefile.lua +++ b/share/spack/templates/modules/modulefile.lua @@ -62,12 +62,7 @@ setenv("LMOD_{{ name|upper() }}_VERSION", "{{ version_part }}") {% block autoloads %} {% for module in autoload %} -if not isloaded("{{ module }}") then -{% if verbose %} - LmodMessage("Autoloading {{ module }}") -{% endif %} - load("{{ module }}") -end +depends_on("{{ module }}") {% endfor %} {% endblock %} |