Add new Run Command method which gusses on the deployment stage to run it local or remote.

This commit is contained in:
Andrés Montañez 2013-10-13 13:15:17 -02:00
parent a29eb1e207
commit f6df60a406

View file

@ -48,6 +48,15 @@ abstract class Mage_Task_TaskAbstract
return $this->getConfig()->getParameter($name, $default, $this->_parameters);
}
protected final function runCommand($command, &$output = null)
{
if ($this->getStage() == 'deploy') {
return $this->_runRemoteCommand($command, $output);
} else {
return $this->_runLocalCommand($command, $output);
}
}
protected final function _runLocalCommand($command, &$output = null)
{
return Mage_Console::executeCommand($command, $output);