From bb4b93e16c37fe3acc1075c147f49221d28e6701 Mon Sep 17 00:00:00 2001 From: gsell Date: Fri, 23 Aug 2024 13:36:31 +0200 Subject: [PATCH] Merge branch '337-modulecmd-use-of-wrong-shell-in-sub-cmd-unload' into 'master' Resolve "modulecmd: use of wrong shell in sub-cmd unload" Closes #337 See merge request Pmodules/src!316 (cherry picked from commit c99e10d1805a6707fa31ac8acebf1fadf7ff530f) 35081f59 modulecmd: bugfix: use of wrong shell in sub-cmd unload Co-authored-by: gsell --- Pmodules/modulecmd.bash.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 1b443e8..4f9ed1e 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1011,7 +1011,7 @@ subcommand_unload() { is_modulefile modulecmd "${lmfile}" || die_not_a_modulefile "${arg}" local output='' - output=$("${modulecmd}" "${Shell}" 'unload' "${arg}") + output=$("${modulecmd}" 'bash' 'unload' "${arg}") if [[ -n "${output}" ]]; then eval "$(echo "${output}"|${sed} -e 's/;unalias [^;]*//g')" fi