From e9dc6dc96cf4aa912dcff12413c10e51f73631cb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 4 Jul 2023 03:48:56 -0500 Subject: Fix DYLD_* propagation to Python process from fish shell (#38615) --- share/spack/setup-env.fish | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/share/spack/setup-env.fish b/share/spack/setup-env.fish index e00d8e76bb..901ffe129f 100755 --- a/share/spack/setup-env.fish +++ b/share/spack/setup-env.fish @@ -372,7 +372,14 @@ end function spack_runner -d "Runner function for the `spack` wrapper" - + # Store DYLD_* variables from spack shell function + # This is necessary because MacOS System Integrity Protection clears + # variables that affect dyld on process start. + for var in DYLD_LIBRARY_PATH DYLD_FALLBACK_LIBRARY_PATH + if set -q $var + set -gx SPACK_$var $$var + end + end # # Accumulate initial flags for main spack command -- cgit v1.2.3-70-g09d2