This PR fixes an issue when the output interface has been set to a NullOutput instance (e.g. when using the callSilent method in Laravel).
Currently, cursor manipulation and erase escape sequences are written directly to STDOUT because they interfere with the trailing newline calculation. However, when a NullOutput instance is used, the escape sequences are still output while the rest of the output is dropped.
When using Laravel's OutputStyle, we can bypass its newline calculation by writing directly to the underlying OutputInterface using the getOutput method.
When used without Laravel, I've added a writeDirectly method to the ConsoleOutput class that bypasses the calculation.
This partially solves #22, but a framework PR is required to completely solve it.
This PR fixes an issue when the output interface has been set to a
NullOutput
instance (e.g. when using thecallSilent
method in Laravel).Currently, cursor manipulation and erase escape sequences are written directly to STDOUT because they interfere with the trailing newline calculation. However, when a
NullOutput
instance is used, the escape sequences are still output while the rest of the output is dropped.When using Laravel's
OutputStyle
, we can bypass its newline calculation by writing directly to the underlyingOutputInterface
using thegetOutput
method.When used without Laravel, I've added a
writeDirectly
method to theConsoleOutput
class that bypasses the calculation.This partially solves #22, but a framework PR is required to completely solve it.