diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index bff6586460..cce9869e85 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -338,7 +338,7 @@ def write_config_file(self, flags, path, compilers): # Tolerate missing compilers. # Initially, we installed icx/ifx/icc/ifort into a single prefix. # Starting in 2024, there is no icc. 2023.2.3 does not have an ifx. - if os.path.exists(compiler): + if os.path.exists(path.join(compiler)): p = path.join(compiler + ".cfg") with open(p, "w") as f: f.write(" ".join(flags))