mlog: Do not print 'subproject|' on empty lines

pull/7491/head
Xavier Claessens 4 years ago
parent b33e7bca73
commit 60c2c25d5b
  1. 6
      mesonbuild/mlog.py

@ -211,7 +211,11 @@ def force_print(*args: str, **kwargs: T.Any) -> None:
raw = iostr.getvalue()
if log_depth:
prepend = log_depth[-1] + '| '
raw = prepend + raw.replace('\n', '\n' + prepend, raw.count('\n') - 1)
lines = []
for l in raw.split('\n'):
l = l.strip()
lines.append(prepend + l if l else '')
raw = '\n'.join(lines)
# _Something_ is going to get printed.
try:

Loading…
Cancel
Save