@@ -31,6 +31,9 @@ |
||
| 31 | 31 | static::executeCommand($event, $consoleDir, 'rabbitmq:vhost:define '.$vhost, $options['process-timeout']); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | + /** |
|
| 35 | + * @param string $cmd |
|
| 36 | + */ |
|
| 34 | 37 | protected static function executeCommand(CommandEvent $event, $consoleDir, $cmd, $timeout = 300) |
| 35 | 38 | { |
| 36 | 39 | $php = escapeshellarg(static::getPhp(false)); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $process = new Process($php.($phpArgs ? ' '.$phpArgs : '').' '.$console.' '.$cmd, null, null, null, $timeout); |
| 44 | - $process->run(function ($type, $buffer) use ($event) { $event->getIO()->write($buffer, false); }); |
|
| 44 | + $process->run(function($type, $buffer) use ($event) { $event->getIO()->write($buffer, false); }); |
|
| 45 | 45 | if (!$process->isSuccessful()) { |
| 46 | 46 | throw new \RuntimeException(sprintf("An error occurred when executing the \"%s\" command:\n\n%s\n\n%s.", escapeshellarg($cmd), $process->getOutput(), $process->getErrorOutput())); |
| 47 | 47 | } |