Skip to content

Commit

Permalink
Change "current" symlink owner only if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
spongeben committed Feb 9, 2015
1 parent 3a19d3e commit aab71ec
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Mage/Task/BuiltIn/Deployment/ReleaseTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ public function run()
}
}

if ($resultFetch && $userGroup != '') {
$command = 'chown -h ' . $userGroup . ' ' . $symlink
. ' && '
. 'chown -R ' . $userGroup . ' ' . $currentCopy
if ($resultFetch && $userGroup != '') {
$command = 'chown -R ' . $userGroup . ' ' . $currentCopy
. ' && '
. 'chown ' . $userGroup . ' ' . $releasesDirectory;
if (file_exists($symlink)) {
$command.= ' && ' . 'chown -h ' . $userGroup . ' ' . $symlink;
}
$result = $this->runCommandRemote($command);
if (!$result) {
return $result;
Expand Down

0 comments on commit aab71ec

Please sign in to comment.