There's a bug here that causes output to be cut off if it's
if the line was too long, in that case 'width' chars would
be removed at the beginning, rather than actually showing
'width' chars. Fix that.
Reported-by: Nix <nix@esperi.org.uk>
Fixes: 00fb1f1b2a53 ("Clean subprocess output without newliner")
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
assert not sep_rx.match(x)
content = b''.join(content)
if sep == b'\r' and len(content) > width:
- content = content[width:]
+ content = content[:width]
os.write(dest, content)
if len(content) < width:
os.write(dest, b' ' * (width - len(content)))