diff --git a/CHANGELOG.md b/CHANGELOG.md index a35c5ff6..679f79b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Set the process title according to the current application name and task name * Ignore some low level env vars in runnable command showed in logs +* Fix section output to work on Windows ## 0.12.1 (2024-02-06) diff --git a/src/SectionOutput.php b/src/SectionOutput.php index 6d78c752..b3c0a24e 100644 --- a/src/SectionOutput.php +++ b/src/SectionOutput.php @@ -25,7 +25,7 @@ public function __construct(OutputInterface $output) $this->mainOutput = null; $this->sections = new \SplObjectStorage(); - if ($output instanceof ConsoleOutput && posix_isatty(\STDOUT) && 'true' === getenv('CASTOR_USE_SECTION')) { + if ($output instanceof ConsoleOutput && 'true' === getenv('CASTOR_USE_SECTION') && stream_isatty(\STDOUT)) { $this->mainOutput = $output; $this->consoleOutput = $output->section(); }