/**
* @param $command
*
* @throws \RuntimeException
* @throws \Jumper\Exception\CommunicatorException
* @return String
*/
public function run($command)
{
$result = $this->ssh->exec($command);
if ($result === false) {
throw new CommunicatorException($this->ssh->getLastError());
}
$error = $this->ssh->getStdError();
if (!empty($error)) {
throw new \RuntimeException($error);
}
return $result;
}