diff --git a/CHANGELOG.md b/CHANGELOG.md index 18037af..05b599f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## Version 2.0.4 ### modulecmd +* Bugfix in unloading modules. A versioned module couldn't be + unloaded if only the name was specified. + (#1364) * Use of unset variable fixed in find_modulefile(). (#1358) * When loading multiple modules, `LD_LIBRARY_PATH` may not have diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index d277ea1..871f4aa 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1082,6 +1082,7 @@ subcommand_unload() { # is the module loaded? for lmfile in "${_lmfiles_[@]}" '_zzzz_'; do [[ /${lmfile} =~ /${arg}$ ]] && break + [[ /${lmfile} =~ /${arg}/.* ]] && break done [[ "${lmfile}" == '_zzzz_' ]] && continue