From f67728dc55de431c0d5f4945046adf6f9eb27d52 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 9 Nov 2017 17:30:25 +0100 Subject: [PATCH] Pmodules/modulecmd.bash.in: - get_available_modules2(): return immediately if directory does not exist --- Pmodules/modulecmd.bash.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 2ee1448..f4ca8b1 100755 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -948,6 +948,7 @@ get_available_modules2() { local -r module="$2" local -r use_releases="${3:-${UsedReleases}}" local -a mods=() + test -d "${dir}" || return 0 { cd "${dir}" while read mod; do