nunomaduro / laravel-console-task

✅ Laravel Console Task is a output method for Laravel Console Commands.
MIT License
254 stars 21 forks source link

Duplicates the first character of the title if there are more than one line #16

Open mattstauffer opened 3 years ago

mattstauffer commented 3 years ago

I'm not sure if I'm just using it wrong, but I want a line before my task.. I know I could just do a line myself, but I'm just curious whether this is intended or accidental behavior.

If I don't add a line break: image image

If I add a line break: image image

If I add a character before the line break: image image

mattstauffer commented 3 years ago

Added context: The [OUT] lines are generated within the function being called (removeContainer), not before this command.

owenvoke commented 3 years ago

I'm assuming this is related to these lines which remove the title line so that it can be replaced with the output.

If there's more than 1 line (due to the linebreak) it will just remove the last line and then print the output status underneath. 🤔

We could probably use an "output section" for this, then you can just run $titleSection->overwrite('new content') 🤷🏻 Eh, can't see a way to access the underlying ConsoleOutput instance, and section() on an Illuminate Console instance is something different. 😬