From c010fc662e9e7f26d6b7d9815ed5a1ff47e741b5 Mon Sep 17 00:00:00 2001 From: samuel4x4 Date: Sun, 23 Nov 2014 23:03:31 +0200 Subject: [PATCH] Change runCommandRemote() to runCommand() Change runCommandRemote() to runCommand(), you decide if the command is running local or remote depending of the stage you put the scm/force-update task. Remove the last $result = $this->runCommandLocal($command), not necessary. --- Mage/Task/BuiltIn/Scm/ForceUpdateTask.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Mage/Task/BuiltIn/Scm/ForceUpdateTask.php b/Mage/Task/BuiltIn/Scm/ForceUpdateTask.php index 9d68e09..2b1bfe8 100644 --- a/Mage/Task/BuiltIn/Scm/ForceUpdateTask.php +++ b/Mage/Task/BuiltIn/Scm/ForceUpdateTask.php @@ -65,13 +65,13 @@ class ForceUpdateTask extends AbstractTask $remote = $this->getParameter('remote', 'origin'); $command = 'git fetch ' . $remote . ' ' . $branch; - $result = $this->runCommandRemote($command); + $result = $this->runCommand($command); $command = 'git reset --hard ' . $remote . '/' . $branch; - $result = $result && $this->runCommandRemote($command); + $result = $result && $this->runCommand($command); $command = 'git pull ' . $remote . ' ' . $branch; - $result = $result && $this->runCommandRemote($command); + $result = $result && $this->runCommand($command); break; default: @@ -79,7 +79,6 @@ class ForceUpdateTask extends AbstractTask break; } - $result = $this->runCommandLocal($command); $this->getConfig()->reload(); return $result;