This commit is contained in:
Bruno Baketaric 2018-04-01 19:30:05 +00:00 committed by GitHub
commit 1ca51517b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);
}