summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorAlex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com>2023-10-06 16:19:19 -0700
committerGitHub <noreply@github.com>2023-10-06 16:19:19 -0700
commit7a358c900535d7a35400822e6b630460070feac6 (patch)
tree75ca96d245abca49eb6e0dbdefc777fc1b720dc9 /share
parentb5079614b0f771f5feb1eaf222219e14172b87f1 (diff)
downloadspack-7a358c900535d7a35400822e6b630460070feac6.tar.gz
spack-7a358c900535d7a35400822e6b630460070feac6.tar.bz2
spack-7a358c900535d7a35400822e6b630460070feac6.tar.xz
spack-7a358c900535d7a35400822e6b630460070feac6.zip
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.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.sh2
1 files changed, 1 insertions, 1 deletions
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