Change "current" symlink owner only if it exists

This commit is contained in:
spongeben 2015-02-09 14:44:34 +01:00
parent 3a19d3ef3c
commit aab71eceac

View file

@ -74,12 +74,13 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
}
}
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;