From 94d19e19725905c3d10acd28cce78268a53d5ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 29 Sep 2022 20:42:57 +0200 Subject: [PATCH] hydra: fix localhost detection when protocol prefix are used --- src/hydra-queue-runner/state.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hydra-queue-runner/state.hh b/src/hydra-queue-runner/state.hh index 47e74f55..55c99afc 100644 --- a/src/hydra-queue-runner/state.hh +++ b/src/hydra-queue-runner/state.hh @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -293,7 +294,8 @@ struct Machine bool isLocalhost() { - return sshName == "localhost"; + std::regex r("^(ssh://|ssh-ng://)?localhost$"); + return std::regex_search(sshName, r); } };