diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2021-06-11 14:19:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-11 19:19:24 +0000 |
commit | 11f370e7be3911ab04ba92437e12fa01d0b6827a (patch) | |
tree | 4dcfc801883331cc21345d787e53d5323f5f9e1e /share | |
parent | 4a8785d3711130ee44a5bc3f1a87d2843620433c (diff) | |
download | spack-11f370e7be3911ab04ba92437e12fa01d0b6827a.tar.gz spack-11f370e7be3911ab04ba92437e12fa01d0b6827a.tar.bz2 spack-11f370e7be3911ab04ba92437e12fa01d0b6827a.tar.xz spack-11f370e7be3911ab04ba92437e12fa01d0b6827a.zip |
setup-env: allow users to skip module function setup (#24236)
* setup-env: allow users to skip module function setup
* Add documentation on SPACK_SKIP_MODULES
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/setup-env.fish | 2 | ||||
-rwxr-xr-x | share/spack/setup-env.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/share/spack/setup-env.fish b/share/spack/setup-env.fish index 7bbc8f8485..239fb8709f 100755 --- a/share/spack/setup-env.fish +++ b/share/spack/setup-env.fish @@ -703,7 +703,7 @@ set -xg _sp_shell "fish" # Check whether we need environment-variables (module) <= `use` is not available # set -l need_module "no" -if not functions -q use; and not functions -q module +if test -z "$SPACK_SKIP_MODULES"; and not functions -q use; and not functions -q module set need_module "yes" end diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index a64e371f0c..dfe265a594 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -307,7 +307,7 @@ _spack_fn_exists() { } need_module="no" -if ! _spack_fn_exists use && ! _spack_fn_exists module; then +if [ -z "${SPACK_SKIP_MODULES+x}" ] && ! _spack_fn_exists use && ! _spack_fn_exists module; then need_module="yes" fi; |