public static function system($command, $logger = null, $build = null)
{
if (is_array($command)) {
$command = implode(' ', $command);
}
if ($logger) {
$logger->debug('Running Command:' . $command);
}
$lastline = system($command, $returnValue);
if ($returnValue !== 0) {
throw new SystemCommandException("Command failed: {$command} returns: {$lastline}", $build);
}
return $returnValue;
}