From a9fccf7aef235582b57144298335f292cc1551f2 Mon Sep 17 00:00:00 2001 From: gsell Date: Thu, 29 Aug 2024 15:17:15 +0200 Subject: [PATCH] Merge branch '346-modulecmd-make-sure-loadedmodules-_lmfiles_-and-pmodules_home-are-defined' into 'master' Resolve "modulecmd: make sure LOADEDMODULES, _LMFILES_ and PMODULES_HOME are defined" Closes #346 See merge request Pmodules/src!334 (cherry picked from commit 98f7d6b06e56d0c679fc00d6b9f817eed424d22a) 4b676a5b modulecmd: redefine LOADEDMODULES, _LMFILE_, PMODULES_HOME if undef Co-authored-by: gsell --- Pmodules/modulecmd.bash.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 8c7884b..a04511e 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -792,6 +792,10 @@ subcommand_load() { done (( ${#args[@]} == 0 )) && \ die_missing_arg + if [[ ! -v LOADEDMODULES ]]; then + LOADEDMODULES='' + _LMFILES_='' + fi local m='' if [[ ! -v LOADEDMODULES ]]; then