spack/share/spack
Todd Gamblin 054e0d1d11 bugfix: no infinite recursion in setup-env.sh on Cray
On Cray platforms, we rely heavily on the module system to figure out
what targets, compilers, etc. are available. This unfortunately means
that we shell out to the `module` command as part of platform
initialization.

Because we run subcommands in a shell, we can get infinite recursion if
`setup-env.sh` and friends are in some init script like `.bashrc`.

This fixes the infinite loop by adding guards around `setup-env.sh`,
`setup-env.csh`, and `setup-env.fish`, to prevent recursive
initializations of Spack. This is safe because Spack never shells out to
itself, so we do not need it to be initialized in subshells.

- [x] add recursion guard around `setup-env.sh`
- [x] add recursion guard around `setup-env.csh`
- [x] add recursion guard around `setup-env.fish`
2020-07-10 13:05:49 -07:00
..
bash Added alias and bash completion for spacktivate (#16472) 2020-05-13 12:02:38 -06:00
csh macos: use DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH 2020-04-16 17:23:33 -07:00
docker Explicitly install setuptools in docker images (#17143) 2020-06-18 11:16:24 +02:00
docs/docker/module-file-tutorial autotools: remove FORCE_UNSAFE_CONFIGURE from docs, commands, code (#16145) 2020-04-20 08:32:03 -07:00
gitlab Pipelines: Support DAG scheduling and dynamic child pipelines 2020-05-14 21:11:07 -07:00
logo add artisanal handcrafted SVG Spack logo. (#6165) 2017-11-06 22:42:16 -08:00
qa Add fish shell support (#9279) 2020-06-30 14:26:27 -05:00
templates Activate environment in container file (#17316) 2020-06-30 18:17:58 -05:00
setup-env.csh bugfix: no infinite recursion in setup-env.sh on Cray 2020-07-10 13:05:49 -07:00
setup-env.fish bugfix: no infinite recursion in setup-env.sh on Cray 2020-07-10 13:05:49 -07:00
setup-env.sh bugfix: no infinite recursion in setup-env.sh on Cray 2020-07-10 13:05:49 -07:00
spack-completion.bash Add fish shell support (#9279) 2020-06-30 14:26:27 -05:00