Skip to content

Commit ec33292

Browse files
authored
Avoid error when unloading EasyBuild module
When unloading EasyBuild with the extend-Module loaded it fails with: Lmod has detected the following error: Unable to load module because of error when evaluating modulefile: /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/modules/all/EESSI-extend/2023.06-easybuild.lua: [string "help([==[..."]:239: attempt to compare string with nil This is due to the easybuild_version being not set. Change the order of the mode check and include the dependency check type
1 parent 97a004d commit ec33292

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EESSI-extend-easybuild.eb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ eessi_version = os.getenv("EESSI_VERSION") or "2023.06"
216216
-- This avoids issues where EESSI-extend is first loaded with EB => 5.1 (which set these vars)
217217
-- but then EB is swapped for a version < 5.1 and then EESSI-extend is unloaded (which would not unset
218218
-- these vars if we did it conditional on the EB version)
219-
if convertToCanonical(easybuild_version) >= convertToCanonical("5.1") or mode() == "unload" then
219+
if mode() == "unload" or mode() == "dependencyCk" or convertToCanonical(easybuild_version) >= convertToCanonical("5.1") then
220220
setenv ("EASYBUILD_STRICT_RPATH_SANITY_CHECK", "1")
221221
setenv ("EASYBUILD_CUDA_SANITY_CHECK_ERROR_ON_FAILED_CHECKS", "1")
222222
setenv ("EASYBUILD_FAIL_ON_MOD_FILES_GCCCORE", "1")

0 commit comments

Comments
 (0)