From 453a9c92a1afeb4bef1cf8f30ca7385b87d843bc Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Wed, 15 Nov 2017 16:54:20 +0100 Subject: [PATCH] Pmodules/modulecmd.bahs.in: - subcommand_use(): export MODULEPATH if adding a group, closes #25 --- Pmodules/modulecmd.bash.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index f4ca8b1..c908b9e 100755 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1310,8 +1310,6 @@ subcommand_use() { shift done - declare -g PMODULES_USED_GROUPS - pbuild::export_env ${g_shell} PMODULES_USED_GROUPS for dir in "${dirs_to_add[@]}"; do if [[ ${opt_append} == yes ]]; then std::append_path MODULEPATH "${dir}" @@ -1319,6 +1317,8 @@ subcommand_use() { std::prepend_path MODULEPATH "${dir}" fi done + declare -g PMODULES_USED_GROUPS + pbuild::export_env ${g_shell} PMODULES_USED_GROUPS MODULEPATH } local opts=''