1
0
Fork 0

Reset the errorOutput before attempting to run command

pull/376/head
Dave Marshall 2012-02-29 13:32:08 +00:00
parent c2421db7d9
commit cb3548c64c
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class ProcessExecutor
public function execute($command, &$output = null) public function execute($command, &$output = null)
{ {
$captureOutput = count(func_get_args()) > 1; $captureOutput = count(func_get_args()) > 1;
$this->errorOutput = null;
$process = new Process($command, null, null, null, static::getTimeout()); $process = new Process($command, null, null, null, static::getTimeout());
$process->run(function($type, $buffer) use ($captureOutput) { $process->run(function($type, $buffer) use ($captureOutput) {
if ($captureOutput) { if ($captureOutput) {