Closed cfconrad closed 2 years ago
Exactly, this https://github.com/os-autoinst/os-autoinst/pull/1855 is where it comes from.
Just use this snippet to reproduce:
use Mojo::Base -strict;
use Mojo::IOLoop::ReadWriteProcess "process";
say scalar(process(sub { say $_ for (1..10)})->start->wait_stop()->read_all_stdout());
This fix all methods which use _getlines() underneath, e.g. read_all_stdout(). In scalar context, this function return a join() version of
IO::Handle::getlines()
. With this fix, we avoid the extra added '\n' string.