Skip to content

Commit c01fec1

Browse files
author
Caspar van Leeuwen
committed
Add check for the existence of the EESSI_SITE_SOFTWARE_PATH. This is needed if we make this location configurable thourhg EESSI_SITE_SOFTWARE_PREFIX as is done in #232
1 parent 7c1bd0b commit c01fec1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

EESSI-extend-easybuild.eb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,17 @@ elseif eessi_site_install then
143143
LmodError("You cannot use EESSI_SITE_INSTALL in combination with any other EESSI_*_INSTALL environment variables")
144144
end
145145
easybuild_installpath = os.getenv("EESSI_SITE_SOFTWARE_PATH")
146-
-- enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested)
146+
-- Check that the plain EESSI_SITE_SOFTWARE_PATH exists
147+
if not isDir(easybuild_installpath) then
148+
LmodError("The location of EESSI_SITE_SOFTWARE_PATH (" .. easybuild_installdir .. ") does not exist or is not a folder")
149+
end
150+
-- enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested)
147151
if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then
148152
easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target)
153+
-- Check that the EESSI_SITE_SOFTWARE_PATH with eessi_accelerator_target prefix exists
154+
if not isDir(easybuild_installpath) then
155+
LmodError("The easybuild install directory (" .. easybuild_installdir ..") does not exist or is not a folder")
156+
end
149157
end
150158
else
151159
-- Deal with user and project installs

0 commit comments

Comments
 (0)