mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Add check for 0 hosts
This commit is contained in:
parent
7f74425d88
commit
e58af6fe28
@ -62,7 +62,10 @@ class SshCommand extends Command
|
||||
return !($host instanceof Localhost);
|
||||
});
|
||||
|
||||
if (count($hosts) === 1) {
|
||||
if (count($hosts) === 0) {
|
||||
$output->writeln('No remote hosts.');
|
||||
return; // Because there are no hosts.
|
||||
} else if (count($hosts) === 1) {
|
||||
$host = array_shift($hosts);
|
||||
} else {
|
||||
$helper = $this->getHelper('question');
|
||||
|
Loading…
x
Reference in New Issue
Block a user