mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-22 23:52:12 +02:00
[Nostromo] Apply PHP Mess Detector recommendations
This commit is contained in:
parent
2c567bebff
commit
c2b83428f0
|
@ -144,7 +144,9 @@ class DeployCommand extends AbstractCommand
|
||||||
if (count($hosts) == 0) {
|
if (count($hosts) == 0) {
|
||||||
$output->writeln(sprintf(' No hosts defined, skipping %s tasks', $this->getStageName()));
|
$output->writeln(sprintf(' No hosts defined, skipping %s tasks', $this->getStageName()));
|
||||||
$output->writeln('');
|
$output->writeln('');
|
||||||
} else {
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($hosts as $host) {
|
foreach ($hosts as $host) {
|
||||||
$this->runtime->setWorkingHost($host);
|
$this->runtime->setWorkingHost($host);
|
||||||
if (!$this->runTasks($output, $tasks)) {
|
if (!$this->runTasks($output, $tasks)) {
|
||||||
|
@ -154,7 +156,6 @@ class DeployCommand extends AbstractCommand
|
||||||
$this->runtime->setWorkingHost(null);
|
$this->runtime->setWorkingHost(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs all the tasks
|
* Runs all the tasks
|
||||||
|
|
|
@ -414,10 +414,9 @@ class Runtime
|
||||||
$host = $this->getWorkingHost();
|
$host = $this->getWorkingHost();
|
||||||
$sshConfig = $this->getSSHConfig();
|
$sshConfig = $this->getSSHConfig();
|
||||||
|
|
||||||
|
$cmdDelegate = $cmd;
|
||||||
if ($sudo === true) {
|
if ($sudo === true) {
|
||||||
$cmdDelegate = sprintf('sudo %s', $cmd);
|
$cmdDelegate = sprintf('sudo %s', $cmd);
|
||||||
} else {
|
|
||||||
$cmdDelegate = $cmd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($jail) {
|
if ($jail) {
|
||||||
|
|
Loading…
Reference in a new issue