diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 862990f..1d76269 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1435,6 +1435,7 @@ subcommand_unuse() { unuse() { unuse_overlay() { overlay=${overlay%:*} # ignore any modifier + overlay=${overlay%/} # remove trailing '/' if there is one [[ -d "${overlay}" ]] || \ std::die 3 "%s %s: %s -- %s\n" \ "${CMD}" "${subcommand}" \