Only display 'Error trying to execute' message if a command's status is not successful. See #533

This commit is contained in:
Dan Cryer 2014-07-31 12:18:23 +01:00
commit 64fc4f0e16

View file

@ -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);
}