diff vendor/symfony/console/Style/OutputStyle.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/symfony/console/Style/OutputStyle.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/vendor/symfony/console/Style/OutputStyle.php	Mon Apr 23 09:46:53 2018 +0100
@@ -14,6 +14,7 @@
 use Symfony\Component\Console\Formatter\OutputFormatterInterface;
 use Symfony\Component\Console\Helper\ProgressBar;
 use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Output\ConsoleOutputInterface;
 
 /**
  * Decorates output to add console style guide helpers.
@@ -24,9 +25,6 @@
 {
     private $output;
 
-    /**
-     * @param OutputInterface $output
-     */
     public function __construct(OutputInterface $output)
     {
         $this->output = $output;
@@ -145,4 +143,13 @@
     {
         return $this->output->isDebug();
     }
+
+    protected function getErrorOutput()
+    {
+        if (!$this->output instanceof ConsoleOutputInterface) {
+            return $this->output;
+        }
+
+        return $this->output->getErrorOutput();
+    }
 }