`chown` symlink directory only if exists
This commit is contained in:
robi50 2015-03-03 01:29:15 +02:00
parent b8e6ea062e
commit b455bf8174

View file

@ -75,7 +75,7 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
}
if ($resultFetch && $userGroup != '') {
$command = 'chown -h ' . $userGroup . ' ' . $symlink
$command = '(test ! -d '. $symlink .' || chown -h ' . $userGroup . ' ' . $symlink . ')'
. ' && '
. 'chown -R ' . $userGroup . ' ' . $currentCopy
. ' && '