What Happened
Web exceptions (html) output to CLI when an exception is encountered running a command.
Expected Behavior
CLI exceptions are displayed.
Steps to Reproduce
- Throw an exception in a cake command
Proposed change:
public function render(): ResponseInterface
{
if (PHP_SAPI === 'cli') {
$request = $request ?? Router::getRequest();
return (new ConsoleExceptionRenderer($this->error, $request, $this->_config))->render();
}
}