gcc: fix run environment variables not being exported in environments (#41729)

Since views use symlinks, all compiler binaries were skipped in this
case. Instead, only skip them if their target does not exist.
This commit is contained in:
Michael Kuhn
2023-12-18 16:19:38 +01:00
committed by GitHub
parent ffd2a34d9e
commit 7550a41660

View File

@@ -1016,7 +1016,9 @@ def setup_run_environment(self, env):
continue
abspath = os.path.join(bin_path, filename)
if os.path.islink(abspath):
# Skip broken symlinks (https://github.com/spack/spack/issues/41327)
if not os.path.exists(abspath):
continue
# Set the proper environment variable