Browse Source

[Nostromo] Apply PHP Mess Detector recommendations

pull/1/head
Andrés Montañez 8 years ago
parent
commit
c2b83428f0
  1. 15
      src/Command/BuiltIn/DeployCommand.php
  2. 3
      src/Runtime/Runtime.php

15
src/Command/BuiltIn/DeployCommand.php

@ -144,15 +144,16 @@ class DeployCommand extends AbstractCommand
if (count($hosts) == 0) {
$output->writeln(sprintf(' No hosts defined, skipping %s tasks', $this->getStageName()));
$output->writeln('');
} else {
foreach ($hosts as $host) {
$this->runtime->setWorkingHost($host);
if (!$this->runTasks($output, $tasks)) {
$this->runtime->setWorkingHost(null);
throw $this->getException();
}
return true;
}
foreach ($hosts as $host) {
$this->runtime->setWorkingHost($host);
if (!$this->runTasks($output, $tasks)) {
$this->runtime->setWorkingHost(null);
throw $this->getException();
}
$this->runtime->setWorkingHost(null);
}
}

3
src/Runtime/Runtime.php

@ -414,10 +414,9 @@ class Runtime
$host = $this->getWorkingHost();
$sshConfig = $this->getSSHConfig();
$cmdDelegate = $cmd;
if ($sudo === true) {
$cmdDelegate = sprintf('sudo %s', $cmd);
} else {
$cmdDelegate = $cmd;
}
if ($jail) {

Loading…
Cancel
Save