public function runCommand($serviceId, $args)
{
chdir(Workspace::getWorkspacePath());
$input = new ArrayInput($args);
$output = new BufferedOutput();
$command = $this->getContainer()->get($serviceId);
$exitCode = $command->run($input, $output);
if ($exitCode !== 0) {
throw new \RuntimeException(sprintf('Got non-zero exit code when executing command "%s"', $serviceId));
}
return $output;
}