From f6df60a40668a52495e589b089035ba9f731cd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Sun, 13 Oct 2013 13:15:17 -0200 Subject: [PATCH] Add new Run Command method which gusses on the deployment stage to run it local or remote. --- Mage/Task/TaskAbstract.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Mage/Task/TaskAbstract.php b/Mage/Task/TaskAbstract.php index 695290e..47a2107 100644 --- a/Mage/Task/TaskAbstract.php +++ b/Mage/Task/TaskAbstract.php @@ -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);