From 2b3696f070959c4cfda3c92827bed30cb03a48b8 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 13 Dec 2021 09:36:06 +0100 Subject: [PATCH] modulecmd: bugfix in get_overlay_info() --- Pmodules/modulecmd.bash.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index a3dddc1..ad0ff91 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1339,9 +1339,11 @@ get_overlay_info(){ [[ -n "$2" ]] && std::upvar "$2" "${_type}" [[ -n "$3" ]] && std::upvar "$3" "${toks[1]}" if [[ -n "$4" ]]; then - std::upvar "$4" "${toks[2]}" - else - std::upvar "$4" "${toks[1]}" + if [[ -n "${toks[2]}" ]]; then + std::upvar "$4" "${toks[2]}" + else + std::upvar "$4" "${toks[1]}" + fi fi return 0 fi