Skip to content

Commit 10fe735

Browse files
committed
Truncate output that we log from commands to 10 lines
1 parent 9cf20d0 commit 10fe735

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/doc_builder/environments.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ def run_command_class(
457457
if warn_only:
458458
msg = 'Command {cmd} failed'.format(cmd=build_cmd.get_command())
459459
if build_cmd.output:
460-
msg += ':\n{out}'.format(out=build_cmd.output)
460+
truncated_output = "\n".join(build_cmd.output.split("\n")[:10])
461+
msg += ":\n{out}".format(out=truncated_output)
461462
log.warning(
462463
msg,
463464
project_slug=self.project.slug if self.project else '',

0 commit comments

Comments
 (0)