Skip to content

Commit d4b4be4

Browse files
committed
Revert "Fix recursive module loading."
This reverts commit 732c24f.
1 parent 0898148 commit d4b4be4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

share/spack/setup-env.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,19 @@ function spack {
121121
# If spack module command comes back with an error, do nothing.
122122
case $_sp_subcommand in
123123
"use")
124-
if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type dotkit "${_sp_spec[@]}"); then
124+
if _sp_full_spec=$(command spack $_sp_flags dotkit find $_sp_subcommand_args "${_sp_spec[@]}"); then
125125
use $_sp_module_args $_sp_full_spec
126126
fi ;;
127127
"unuse")
128-
if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type dotkit "${_sp_spec[@]}"); then
128+
if _sp_full_spec=$(command spack $_sp_flags dotkit find $_sp_subcommand_args "${_sp_spec[@]}"); then
129129
unuse $_sp_module_args $_sp_full_spec
130130
fi ;;
131131
"load")
132-
if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type tcl "${_sp_spec[@]}"); then
132+
if _sp_full_spec=$(command spack $_sp_flags tcl find $_sp_subcommand_args "${_sp_spec[@]}"); then
133133
module load $_sp_module_args $_sp_full_spec
134134
fi ;;
135135
"unload")
136-
if _sp_full_spec=$(command spack $_sp_flags module loads --input-only $_sp_subcommand_args --module-type tcl "${_sp_spec[@]}"); then
136+
if _sp_full_spec=$(command spack $_sp_flags tcl find $_sp_subcommand_args "${_sp_spec[@]}"); then
137137
module unload $_sp_module_args $_sp_full_spec
138138
fi ;;
139139
esac

0 commit comments

Comments
 (0)