From 6f1bd5c0cc30f40e9128fad5283090e6a2ebe879 Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 29 Apr 2015 17:11:18 -0700 Subject: [PATCH 1/2] resultFetch is always false when owner is specified in config --- Mage/Task/BuiltIn/Deployment/ReleaseTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/Task/BuiltIn/Deployment/ReleaseTask.php b/Mage/Task/BuiltIn/Deployment/ReleaseTask.php index 93df8cf..266205f 100644 --- a/Mage/Task/BuiltIn/Deployment/ReleaseTask.php +++ b/Mage/Task/BuiltIn/Deployment/ReleaseTask.php @@ -74,7 +74,7 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride } } - if ($resultFetch && $userGroup != '') { + if ($userGroup != '') { $command = 'chown -R ' . $userGroup . ' ' . $currentCopy . ' && ' . 'chown ' . $userGroup . ' ' . $releasesDirectory; From a3219e8f683799342b3457636d10f5a88bbd15cb Mon Sep 17 00:00:00 2001 From: Kirill Date: Thu, 30 Apr 2015 15:58:43 -0700 Subject: [PATCH 2/2] Default userGroup to 33:33. Removing extra condition. --- Mage/Task/BuiltIn/Deployment/ReleaseTask.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Mage/Task/BuiltIn/Deployment/ReleaseTask.php b/Mage/Task/BuiltIn/Deployment/ReleaseTask.php index 266205f..d635c2d 100644 --- a/Mage/Task/BuiltIn/Deployment/ReleaseTask.php +++ b/Mage/Task/BuiltIn/Deployment/ReleaseTask.php @@ -70,18 +70,16 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride if (!empty($infoArray[3])) { $group = $infoArray[3]; } - $userGroup = $user . ':' . $group; } + $userGroup = $user . ':' . $group; } - if ($userGroup != '') { - $command = 'chown -R ' . $userGroup . ' ' . $currentCopy - . ' && ' - . 'chown ' . $userGroup . ' ' . $releasesDirectory; - $result = $this->runCommandRemote($command); - if (!$result) { - return $result; - } + $command = 'chown -R ' . $userGroup . ' ' . $currentCopy + . ' && ' + . 'chown ' . $userGroup . ' ' . $releasesDirectory; + $result = $this->runCommandRemote($command); + if (!$result) { + return $result; } // Switch symlink and change owner