From 7a358c900535d7a35400822e6b630460070feac6 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:19:19 -0700 Subject: Change 'exit' to 'return' in setup-env.sh (#36137) * Change 'exit' to 'return' in `setup-env.sh` to avoid losing shell in some cases when sourcing twice. --- share/spack/setup-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 7d4554359f..b5f4348635 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -41,7 +41,7 @@ # prevent infinite recursion when spack shells out (e.g., on cray for modules) if [ -n "${_sp_initializing:-}" ]; then - exit 0 + return 0 fi export _sp_initializing=true -- cgit v1.2.3-60-g2f50