From 11f370e7be3911ab04ba92437e12fa01d0b6827a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 11 Jun 2021 14:19:24 -0500 Subject: 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 --- share/spack/setup-env.fish | 2 +- share/spack/setup-env.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'share') 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; -- cgit v1.2.3-70-g09d2