Merge branch '90-bugfix-module-unload-broken' into 'master'

Resolve "bugfix: module unload broken"

Closes #90

See merge request Pmodules/src!54
This commit is contained in:
2020-01-15 13:01:58 +01:00
+6 -3
View File
@@ -594,11 +594,14 @@ subcommand_unload() {
for arg in "${args[@]}"; do
local output=$("${modulecmd}" "${Shell}" 'unload' "${arg}")
eval "${output}"
if [[ "${Shell}" == "bash" ]]; then
case ${Shell} in
sh | bash | zsh )
echo "${output}"
else
;;
* )
"${modulecmd}" "${Shell}" 'unload' "${arg}"
fi
;;
esac
done
}