Skip SSH stuff if host = localhost; this should allow local "deployments".

This commit is contained in:
Bruno Baketaric 2018-03-16 15:32:43 +01:00
parent 3ed4c758c0
commit cf8d8e70d5

View file

@ -444,8 +444,12 @@ class Runtime
$cmdDelegate = sprintf('cd %s && %s', $hostPath, $cmdDelegate);
}
$cmdRemote = str_replace('"', '\"', $cmdDelegate);
$cmdLocal = sprintf('ssh -p %d %s %s@%s "%s"', $sshConfig['port'], $sshConfig['flags'], $user, $host, $cmdRemote);
if ('localhost' !== $host) {
$cmdRemote = str_replace('"', '\"', $cmdDelegate);
$cmdLocal = sprintf('ssh -p %d %s %s@%s "%s"', $sshConfig['port'], $sshConfig['flags'], $user, $host, $cmdRemote);
} else {
$cmdLocal = $cmdDelegate;
}
return $this->runLocalCommand($cmdLocal, $timeout);
}