From bf6220821bca6e15d6a2c57780c94b8d0abd1d93 Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Tue, 14 Jun 2022 09:06:06 -0400 Subject: [PATCH] Make the IntelPackage fail successfully (#30773) Co-authored-by: Robert Cohn --- lib/spack/spack/build_systems/intel.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py index aeb3f861c1..a249afff90 100644 --- a/lib/spack/spack/build_systems/intel.py +++ b/lib/spack/spack/build_systems/intel.py @@ -1259,6 +1259,14 @@ def install(self, spec, prefix): for f in glob.glob('%s/intel*log' % tmpdir): install(f, dst) + @run_after('install') + def validate_install(self): + # Sometimes the installer exits with an error but doesn't pass a + # non-zero exit code to spack. Check for the existence of a 'bin' + # directory to catch this error condition. + if not os.path.exists(self.prefix.bin): + raise InstallError('The installer has failed to install anything.') + @run_after('install') def configure_rpath(self): if '+rpath' not in self.spec: