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
This commit is contained in:
2024-08-23 13:09:29 +02:00
+1 -1
View File
@@ -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