diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 72f14df..c7dde60 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -2225,7 +2225,7 @@ subcommand_unuse() { # remove root of overlay local -- dir='' for dir in "${modulepath[@]}"; do - [[ "${dir}" == "${OverlayInfo[${ol_name}:modulefiles_root]}" ]] && \ + [[ "${dir}"/* == "${OverlayInfo[${ol_name}:modulefiles_root]}/*" ]] && \ std::remove_path MODULEPATH "${dir}" done