From 99dfdcdfb207ce0dbbd352456937e7f1e7d236a1 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Wed, 30 Jul 2014 14:58:07 +0100 Subject: [PATCH] Adding a getLastError() method as a stderr equivalent of getLastOutput() to commandexecutor. --- PHPCI/Helper/BaseCommandExecutor.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PHPCI/Helper/BaseCommandExecutor.php b/PHPCI/Helper/BaseCommandExecutor.php index 418b664f..7082b722 100644 --- a/PHPCI/Helper/BaseCommandExecutor.php +++ b/PHPCI/Helper/BaseCommandExecutor.php @@ -131,6 +131,14 @@ abstract class BaseCommandExecutor implements CommandExecutor return implode(PHP_EOL, $this->lastOutput); } + /** + * Returns the stderr output from the last command run. + */ + public function getLastError() + { + return $this->lastError; + } + /** * Find a binary required by a plugin. * @param string $binary