Browse Source

Change "current" symlink owner only if it exists

1.0
spongeben 10 years ago
parent
commit
aab71eceac
  1. 7
      Mage/Task/BuiltIn/Deployment/ReleaseTask.php

7
Mage/Task/BuiltIn/Deployment/ReleaseTask.php

@ -75,11 +75,12 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
} }
if ($resultFetch && $userGroup != '') { if ($resultFetch && $userGroup != '') {
$command = 'chown -h ' . $userGroup . ' ' . $symlink $command = 'chown -R ' . $userGroup . ' ' . $currentCopy
. ' && '
. 'chown -R ' . $userGroup . ' ' . $currentCopy
. ' && ' . ' && '
. 'chown ' . $userGroup . ' ' . $releasesDirectory; . 'chown ' . $userGroup . ' ' . $releasesDirectory;
if (file_exists($symlink)) {
$command.= ' && ' . 'chown -h ' . $userGroup . ' ' . $symlink;
}
$result = $this->runCommandRemote($command); $result = $this->runCommandRemote($command);
if (!$result) { if (!$result) {
return $result; return $result;

Loading…
Cancel
Save