[Nostromo] Rollback command, Mess Detector recommendation.

This commit is contained in:
Andrés Montañez 2017-01-08 01:33:14 -03:00
parent 5bff78e1cd
commit 3749978ccc

View file

@ -106,6 +106,7 @@ class RollbackCommand extends DeployCommand
$availableInHosts = 0;
foreach ($hosts as $host) {
$releases = [];
$this->runtime->setWorkingHost($host);
// Get List of Releases
@ -113,9 +114,7 @@ class RollbackCommand extends DeployCommand
/** @var Process $process */
$process = $this->runtime->runRemoteCommand($cmdListReleases, false);
if (!$process->isSuccessful()) {
$releases = [];
} else {
if ($process->isSuccessful()) {
$releases = explode(PHP_EOL, trim($process->getOutput()));
rsort($releases);
}