From 42232a8ab6d9c31eb0c943111d2639e0d6a3076f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 16 Jul 2024 06:58:36 +0200 Subject: Fix error message for test log in child process (#45233) If we don't have a log, we'll mask the real error with another caused by using None as an argument to os.path.join --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 2b8cc1fca1..c02c3bc818 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -1473,7 +1473,7 @@ class ChildError(InstallError): out.write(" {0}\n".format(self.log_name)) # Also output the test log path IF it exists - if self.context != "test": + if self.context != "test" and have_log: test_log = join_path(os.path.dirname(self.log_name), spack_install_test_log) if os.path.isfile(test_log): out.write("\nSee test log for details:\n") -- cgit v1.2.3-70-g09d2