Fix error caused by missing spack-build.out build log
This commit is contained in:
parent
db508a8f89
commit
f97550e149
@ -908,7 +908,7 @@ def long_message(self):
|
|||||||
if (self.module, self.name) in ChildError.build_errors:
|
if (self.module, self.name) in ChildError.build_errors:
|
||||||
# The error happened in some external executed process. Show
|
# The error happened in some external executed process. Show
|
||||||
# the build log with errors highlighted.
|
# the build log with errors highlighted.
|
||||||
if self.build_log:
|
if self.build_log and os.path.exists(self.build_log):
|
||||||
errors, warnings = parse_log_events(self.build_log)
|
errors, warnings = parse_log_events(self.build_log)
|
||||||
nerr = len(errors)
|
nerr = len(errors)
|
||||||
if nerr > 0:
|
if nerr > 0:
|
||||||
@ -929,7 +929,7 @@ def long_message(self):
|
|||||||
if out.getvalue():
|
if out.getvalue():
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
|
|
||||||
if self.build_log:
|
if self.build_log and os.path.exists(self.build_log):
|
||||||
out.write('See build log for details:\n')
|
out.write('See build log for details:\n')
|
||||||
out.write(' %s' % self.build_log)
|
out.write(' %s' % self.build_log)
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ def print_context(self):
|
|||||||
"""Print extended debug information about this exception.
|
"""Print extended debug information about this exception.
|
||||||
|
|
||||||
This is usually printed when the top-level Spack error handler
|
This is usually printed when the top-level Spack error handler
|
||||||
calls ``die()``, but it acn be called separately beforehand if a
|
calls ``die()``, but it can be called separately beforehand if a
|
||||||
lower-level error handler needs to print error context and
|
lower-level error handler needs to print error context and
|
||||||
continue without raising the exception to the top level.
|
continue without raising the exception to the top level.
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user