From de91ea392529a225f0ebb69aff7d8a2a4ce4ff90 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:16:26 +0200 Subject: [PATCH] Update 2023.06.lua To prevent error bad argument #1 to 'gmatch' when module show is used and EESSI_ARCHDETECT_OPTIONS is not set --- init/modules/EESSI/2023.06.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 61a35d20a1..9ad85f42d8 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -25,7 +25,8 @@ function archdetect_cpu() end source_sh("bash", script) end - for archdetect_filter_cpu in string.gmatch(os.getenv("EESSI_ARCHDETECT_OPTIONS"), "([^" .. ":" .. "]+)") do +local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or "" + for archdetect_filter_cpu in string.gmatch(archdetect_options, "([^" .. ":" .. "]+)") do if isDir(pathJoin(eessi_prefix, "software", eessi_os_type, archdetect_filter_cpu, "software")) then -- use x86_64/amd/zen3 for now when AMD Genoa (Zen4) CPU is detected, -- since optimized software installations for Zen4 are a work-in-progress,