summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Reddy <tyler.je.reddy@gmail.com>2019-09-12 11:11:27 -0600
committerChristoph Junghans <junghans@lanl.gov>2019-09-12 11:11:27 -0600
commit25dbc9fb8e992d6ff211a0ab28a22969f556599e (patch)
tree64284fff5e33669c1960a8440523fc2c1faa435d
parent5a6d060b5223ebcd7cba35671c00c4ddf5d6ad24 (diff)
downloadspack-25dbc9fb8e992d6ff211a0ab28a22969f556599e.tar.gz
spack-25dbc9fb8e992d6ff211a0ab28a22969f556599e.tar.bz2
spack-25dbc9fb8e992d6ff211a0ab28a22969f556599e.tar.xz
spack-25dbc9fb8e992d6ff211a0ab28a22969f556599e.zip
BUG: recursively load modules with tcsh (#12664)
* for tcsh and csh, spack load -r package should now correctly load recursively instead of only loading the target package without any dependencies
-rw-r--r--share/spack/csh/spack.csh7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/spack/csh/spack.csh b/share/spack/csh/spack.csh
index afda7762be..01be616572 100644
--- a/share/spack/csh/spack.csh
+++ b/share/spack/csh/spack.csh
@@ -132,7 +132,12 @@ case unload:
endif
breaksw
case "load":
- set _sp_full_spec = ( "`\spack $_sp_flags module tcl find $_sp_spec`" )
+ # _sp_module_args may be "-r" for recursive spec retrieval
+ set _sp_full_spec = ( "`\spack $_sp_flags module tcl find $_sp_module_args $_sp_spec`" )
+ if ( "$_sp_module_args" == "-r" ) then
+ # module load can handle the list of modules to load and "-r" is not a valid option
+ set _sp_module_args = ""
+ endif
if ( $? == 0 ) then
module load $_sp_module_args $_sp_full_spec
endif