src/Plum/Deployer/SshDeployer.php
public function doDeploy(ServerInterface $server, array $options, $dryRun)
    {
        $commands = isset($options['commands']) ? $options['commands'] : array();
        if (0 === count($commands)) {
            // The SSH deployer is useless if the user has no command
            return;
        }

        if (null === $server->getPassword()) {
            throw new SshException('No password found for the server.');
        }

        $this->connect($server);

        if (false === $dryRun) {
            foreach ($commands as $command) {
                // We need to jump to the right directory..
                $command = sprintf('cd %s && %s', $server->getDir(), $command);
                $this->exec($command);
            }
        }

        $this->disconnect();
    }
public function doDeploy(ServerInterface $server, array $options, $dryRun)
    {
        $commands = isset($options['commands']) ? $options['commands'] : array();
        if (0 === count($commands)) {
            // The SSH deployer is useless if the user has no command
            return;
        }

        if (null === $server->getPassword()) {
            throw new SshException('No password found for the server.');
        }

        $this->connect($server);

        if (false === $dryRun) {
            foreach ($commands as $command) {
                // We need to jump to the right directory..
                $command = sprintf('cd %s && %s', $server->getDir(), $command);
                $this->exec($command);
            }
        }

        $this->disconnect();
    }
{@inheritDoc}