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.
This commit is contained in:
Alex Richert 2023-10-06 16:19:19 -07:00 committed by GitHub
parent b5079614b0
commit 7a358c9005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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