From 2b62e46c20e05d90d89faf00fd6f96963067bffb Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Thu, 31 Jul 2014 12:18:23 +0100 Subject: [PATCH] Only display 'Error trying to execute' message if a command's status is not successful. See #533 --- PHPCI/Helper/BaseCommandExecutor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PHPCI/Helper/BaseCommandExecutor.php b/PHPCI/Helper/BaseCommandExecutor.php index 7082b722..c9557c14 100644 --- a/PHPCI/Helper/BaseCommandExecutor.php +++ b/PHPCI/Helper/BaseCommandExecutor.php @@ -110,7 +110,10 @@ abstract class BaseCommandExecutor implements CommandExecutor } if (!empty($this->lastError)) { - $this->logger->log("\033[0;31m" . 'Error trying to execute: ' . $command . "\033[0m", LogLevel::ERROR); + if ($status != 0) { + $this->logger->log("\033[0;31m" . 'Error trying to execute: ' . $command . "\033[0m", LogLevel::ERROR); + } + $this->logger->log("\033[0;31m" . $this->lastError . "\033[0m", LogLevel::ERROR); }