mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-04 23:02:15 +02:00
Change "current" symlink owner only if it exists
This commit is contained in:
parent
3a19d3ef3c
commit
aab71eceac
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue