Skip to content

Commit 51b4b22

Browse files
authored
Merge pull request #8904 from readthedocs/agj/reduce-verbose-logging
2 parents 3043d62 + 09073ea commit 51b4b22

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

readthedocs/doc_builder/environments.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,24 +444,21 @@ def run_command_class(
444444
self.commands.append(build_cmd)
445445

446446
if build_cmd.failed:
447-
msg = 'Command {cmd} failed'.format(cmd=build_cmd.get_command())
448-
449-
# TODO: improve this error report. This is showing _the full_
450-
# stdout to the user exposing it at the top of the Build Detail's
451-
# page in red. It would be good to reduce the noise here and just
452-
# point the user to take a look at its output from the command's
453-
# output itself.
454-
if build_cmd.output:
455-
msg += ':\n{out}'.format(out=build_cmd.output)
456-
457447
if warn_only:
448+
msg = 'Command {cmd} failed'.format(cmd=build_cmd.get_command())
449+
if build_cmd.output:
450+
msg += ':\n{out}'.format(out=build_cmd.output)
458451
log.warning(
459452
msg,
460453
project_slug=self.project.slug if self.project else '',
461454
version_slug=self.version.slug if self.version else '',
462455
)
463456
else:
464-
raise BuildUserError(msg)
457+
# TODO: for now, this still outputs a generic error message
458+
# that is the same across all commands. We could improve this
459+
# with more granular error messages that vary by the command
460+
# being run.
461+
raise BuildUserError()
465462
return build_cmd
466463

467464

0 commit comments

Comments
 (0)