protected function runCommand($toPath, $revert = FALSE, $dryRun = FALSE)
{
$command = $this->whichPatchCmd() . ' -f -p1 --no-backup-if-mismatch -r -';
if ($revert) {
$command .= ' -R';
}
if (isset($this->info->args)) {
$command .= ' ' . $this->info->args;
}
if ($dryRun) {
$command .= ' --dry-run';
}
if ($this->executeProcess($command, $toPath, $this->read(), $stdout) > 0) {
throw new PatchCommandException($command, $stdout, $this, $dryRun);
}
}