summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2021-06-11 14:19:24 -0500
committerGitHub <noreply@github.com>2021-06-11 19:19:24 +0000
commit11f370e7be3911ab04ba92437e12fa01d0b6827a (patch)
tree4dcfc801883331cc21345d787e53d5323f5f9e1e /share
parent4a8785d3711130ee44a5bc3f1a87d2843620433c (diff)
downloadspack-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-xshare/spack/setup-env.fish2
-rwxr-xr-xshare/spack/setup-env.sh2
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;