porter icon indicating copy to clipboard operation
porter copied to clipboard

Directly call `$this->getOutput()->write()` to avoid an extra newline in the `tail` command

Open squatto opened this issue 2 years ago • 1 comments

Currently, the tail command calls $this->line($line), which in turn calls $this->getOutput()->writeln($line). Since the log file is being read with fgets(), $line includes the ending newline character. Passing this to writeln() appends another newline character, resulting in an empty/blank line between each output line:

Screenshot 2023-10-24 at 2 02 01 PM

This change simply directly calls $this->getOutput()->write($line) to avoid appending an extra newline character:

Screenshot 2023-10-24 at 2 02 12 PM

This resolves #12

squatto avatar Oct 24 '23 20:10 squatto

@PhiloNL there's one more simple change left if/when you have a quick sec to merge it as well 🙏🏻 🙏🏻

Thanks!!

squatto avatar Oct 21 '24 18:10 squatto