mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-04 23:13:16 +02:00
Skip SSH stuff if host = localhost; this should allow local "deployments".
This commit is contained in:
parent
3ed4c758c0
commit
cf8d8e70d5
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue