From cf8d8e70d5879ed63b03ccec67ff14d59df4292b Mon Sep 17 00:00:00 2001 From: Bruno Baketaric Date: Fri, 16 Mar 2018 15:32:43 +0100 Subject: [PATCH] Skip SSH stuff if host = localhost; this should allow local "deployments". --- src/Runtime/Runtime.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Runtime/Runtime.php b/src/Runtime/Runtime.php index f28e03f..db3c8d0 100644 --- a/src/Runtime/Runtime.php +++ b/src/Runtime/Runtime.php @@ -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); }