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
This commit is contained in:
Massimiliano Culpo 2024-07-16 06:58:36 +02:00 committed by GitHub
parent cb64df45c8
commit 42232a8ab6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1473,7 +1473,7 @@ def long_message(self):
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")