From a81c79ab1c7ffd02c09c302446d24415b7bd958c Mon Sep 17 00:00:00 2001 From: tygoetsch Date: Wed, 2 Oct 2024 23:52:43 -0600 Subject: [PATCH] Add check to stop BASH_ENV from being set in cshrc.in if it's already been set by another process. --- init/cshrc.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init/cshrc.in b/init/cshrc.in index 50fa5e606..72128350c 100644 --- a/init/cshrc.in +++ b/init/cshrc.in @@ -52,7 +52,10 @@ if ( ! $?MODULEPATH_ROOT ) then setenv MODULEPATH `@PKGV@/libexec/addto MODULEPATH $LMOD_SITE_MODULEPATH` endif - setenv BASH_ENV "@PKGV@/init/bash" + # Don't reset BASH_ENV if set by USER + if ( ! $?BASH_ENV ) then + setenv BASH_ENV "@PKGV@/init/bash" + endif # # If MANPATH is empty, Lmod is adding a trailing ":" so that