From 629a39ebbe69b70f7f41a8b378db197d42e2da8e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 30 Nov 2020 15:31:22 +0100 Subject: [PATCH] Cli/Loader: Configure the used `Screen` to use STDERR Otherwise we still colorize output if stderr is being redirected. --- library/Icinga/Cli/Loader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Cli/Loader.php b/library/Icinga/Cli/Loader.php index abf54f15e..dbd853200 100644 --- a/library/Icinga/Cli/Loader.php +++ b/library/Icinga/Cli/Loader.php @@ -78,8 +78,9 @@ class Loader protected function screen() { if ($this->screen === null) { - $this->screen = Screen::instance(); + $this->screen = Screen::instance(STDERR); } + return $this->screen; }