Skip to content

Commit

Permalink
Do not set host in rsync ssh command arg
Browse files Browse the repository at this point in the history
  • Loading branch information
garfieldius committed Nov 12, 2017
1 parent a08caae commit 8f0f2d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Mage/Task/AbstractTask.php
Expand Up @@ -193,7 +193,9 @@ final protected function runCommandRemote($command, &$output = null, $cdToDirect
$releasesDirectory = '';
}

$localCommand = $this->buildSSHCommand();
$localCommand = $this->buildSSHCommand()
. ($this->getConfig()->deployment('user') != '' ? $this->getConfig()->deployment('user') . '@' : '')
. $this->getConfig()->getHostName();

$remoteCommand = str_replace('"', '\"', $command);
if ($cdToDirectoryFirst) {
Expand Down Expand Up @@ -309,9 +311,7 @@ protected function buildSSHCommand()
. $needs_tty
. ' -p ' . $this->getConfig()->getHostPort() . ' '
. '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
. $this->getConfig()->getConnectTimeoutOption()
. ($this->getConfig()->deployment('user') != '' ? $this->getConfig()->deployment('user') . '@' : '')
. $this->getConfig()->getHostName();
. $this->getConfig()->getConnectTimeoutOption();

return $command;
}
Expand Down

0 comments on commit 8f0f2d2

Please sign in to comment.