From 8468c84b766d91c57585568e7e6aea208f66ee2a Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 12 Mar 2015 17:04:51 +0100 Subject: [PATCH] scripts/Bootstrap/Pmodules/modulecmd.in: bugfix: get_family() now returns empty string, if no modulefiles are installed --- scripts/Bootstrap/Pmodules/modulecmd.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/Bootstrap/Pmodules/modulecmd.in b/scripts/Bootstrap/Pmodules/modulecmd.in index a3bf931..e1e40d8 100755 --- a/scripts/Bootstrap/Pmodules/modulecmd.in +++ b/scripts/Bootstrap/Pmodules/modulecmd.in @@ -668,10 +668,14 @@ subcommand_avail() { } get_families () { + if [[ ! -d "${modulepath_root}" ]]; then + echo "" + else { cd "${modulepath_root}" - echo * + ls -1 } + fi } #