Fix filter_compiler_wrapper where compiler is None (#41502)

Fix filer_compiler_wrapper for cases where the compiler returned in None, this happens on some installed gcc systems that do not have fortran built into them as standard, e.g. gcc@11.4.0 on ubuntu 22.04
This commit is contained in:
Dave Keeshan 2023-12-11 09:31:56 +00:00 committed by Harmen Stoppels
parent 2d5ccd3068
commit 33c287eed8

View file

@ -93,7 +93,7 @@ def _filter_compiler_wrappers_impl(pkg_or_builder):
replacements = [] replacements = []
for idx, (env_var, compiler_path) in enumerate(compiler_vars): for idx, (env_var, compiler_path) in enumerate(compiler_vars):
if env_var in os.environ: if env_var in os.environ and compiler_path is not None:
# filter spack wrapper and links to spack wrapper in case # filter spack wrapper and links to spack wrapper in case
# build system runs realpath # build system runs realpath
wrapper = os.environ[env_var] wrapper = os.environ[env_var]