Skip to content

Commit

Permalink
fixed dead assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed Sep 22, 2012
1 parent bd1744e commit a0c2138
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Command/BaseCommand.php
Expand Up @@ -18,6 +18,8 @@

namespace JMS\GoogleClosureBundle\Command;

use Symfony\Component\Process\Process;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use JMS\GoogleClosureBundle\Exception\RuntimeException;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down Expand Up @@ -183,12 +185,17 @@ protected function runJar(OutputInterface $output, $javaBin, $jarPath, $args = n
}

$output->writeln(sprintf('Executing "%s"...', $cmd));
$proc = new Process($cmd);
$h = proc_open($cmd, $descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("pipe", "w") // stderr is a file to write to
), $pipes);

if ( ! is_resource($h)) {
throw new \RuntimeException(sprintf('Could not launch process "%s".', $cmd));
}

fclose($pipes[0]);

while (!feof($pipes[2])) {
Expand Down

0 comments on commit a0c2138

Please sign in to comment.