mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-03 03:38:57 +02:00
when releasing or rolling back, don’t chown the »current« symlink before we changed / created it. also don’t screw up the ssh cmdline if no username was given.
This commit is contained in:
@@ -136,14 +136,12 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
|
||||
$userGroup = '';
|
||||
$resultFetch = $this->runCommandRemote('ls -ld ' . $rollbackTo . ' | awk \'{print \$3":"\$4}\'', $userGroup);
|
||||
|
||||
$tmplink = $rollbackTo . '.tmp';
|
||||
$command = 'ln -sfn ' . $currentCopy . ' ' . $tmplink
|
||||
. ' && '
|
||||
. 'mv -T ' . $tmplink . ' ' . $symlink;
|
||||
|
||||
if ($resultFetch) {
|
||||
$command .= ' && chown -h ' . $userGroup . ' ' . $symlink;
|
||||
$tmplink = $symlink . '.tmp';
|
||||
$command = "ln -sfn {$currentCopy} {$tmplink}";
|
||||
if ($resultFetch && $userGroup) {
|
||||
$command .= " && chown -h {$userGroup} ${tmplink}";
|
||||
}
|
||||
$command .= " && mv -T {$tmplink} {$symlink}";
|
||||
|
||||
$result = $this->runCommandRemote($command);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user