From abc9f11417e2de515006e0fe8dd345f815dc92a7 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 20 Jul 2024 16:09:07 +0200 Subject: [PATCH] queue runner: fix store URI args being written to the SSH hosts file --- src/hydra-queue-runner/build-remote.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index baa8a49b..122b32ce 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -65,8 +65,8 @@ static void openConnection(::Machine::ptr machine, Path tmpDir, int stderrFD, SS if (machine->sshKey != "") append(argv, {"-i", machine->sshKey}); if (machine->sshPublicHostKey != "") { Path fileName = tmpDir + "/host-key"; - auto p = machine->sshName.find("@"); - std::string host = p != std::string::npos ? std::string(machine->sshName, p + 1) : machine->sshName; + auto p = sshName.find("@"); + std::string host = p != std::string::npos ? std::string(sshName, p + 1) : sshName; writeFile(fileName, host + " " + machine->sshPublicHostKey + "\n"); append(argv, {"-oUserKnownHostsFile=" + fileName}); }