From 50ddf081fb4d22764c99458ebadd9eed9c999799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Thu, 29 Mar 2018 17:38:28 -0300 Subject: [PATCH] [BUGFIX] [Issue#405] Malformed ssh command when defining host:port notation --- CHANGELOG.md | 2 +- src/Runtime/Runtime.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d061184..2f35c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ CHANGELOG for 3.X * 3.4.0 (2018-03-29) * [Issue#380] Throw exception if log_dir is defined but directory doesn't exists - * [Issue#405] Malformed ssh command when defining host:port notation + * [BUGFIX] [Issue#405] Malformed ssh command when defining host:port notation * 3.3.0 (2017-07-22) diff --git a/src/Runtime/Runtime.php b/src/Runtime/Runtime.php index 2a4eb07..5b7368d 100644 --- a/src/Runtime/Runtime.php +++ b/src/Runtime/Runtime.php @@ -492,6 +492,10 @@ class Runtime */ public function getHostName() { + if (strpos($this->getWorkingHost(), ':') === false) { + return $this->getWorkingHost(); + } + $info = explode(':', $this->getWorkingHost()); return $info[0]; }