summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-07-21 08:34:36 -0700
committerGitHub <noreply@github.com>2016-07-21 08:34:36 -0700
commit5745ede31dedf16f1356cb85fab5a6fa3860df08 (patch)
tree375714041a9ac18674e4d317eabacd1abebf70f6
parent0b1d03abe61349743a4d7326d9d1ca038450c66b (diff)
parent732c24f603864ec7dbec425ac4507b47fdb7a641 (diff)
downloadspack-5745ede31dedf16f1356cb85fab5a6fa3860df08.tar.gz
spack-5745ede31dedf16f1356cb85fab5a6fa3860df08.tar.bz2
spack-5745ede31dedf16f1356cb85fab5a6fa3860df08.tar.xz
spack-5745ede31dedf16f1356cb85fab5a6fa3860df08.zip
Merge pull request #1328 from suraia/fix-recursive-module-load
Fix recursive module loading
-rwxr-xr-xshare/spack/setup-env.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index c6183f990d..2eb1dfecb3 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -117,19 +117,19 @@ function spack {
# If spack module command comes back with an error, do nothing.
case $_sp_subcommand in
"use")
- if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args --module-type dotkit $_sp_spec); then
+ if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type dotkit $_sp_spec); then
use $_sp_module_args $_sp_full_spec
fi ;;
"unuse")
- if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args --module-type dotkit $_sp_spec); then
+ if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type dotkit $_sp_spec); then
unuse $_sp_module_args $_sp_full_spec
fi ;;
"load")
- if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args --module-type tcl $_sp_spec); then
+ if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type tcl $_sp_spec); then
module load $_sp_module_args $_sp_full_spec
fi ;;
"unload")
- if _sp_full_spec=$(command spack $_sp_flags module find $_sp_subcommand_args --module-type tcl $_sp_spec); then
+ if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type tcl $_sp_spec); then
module unload $_sp_module_args $_sp_full_spec
fi ;;
esac