queue runner: fix store URI args being written to the SSH hosts file
Some checks are pending
Test / tests (push) Waiting to run
Some checks are pending
Test / tests (push) Waiting to run
This commit is contained in:
parent
9a4a5dd624
commit
abc9f11417
|
@ -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->sshKey != "") append(argv, {"-i", machine->sshKey});
|
||||||
if (machine->sshPublicHostKey != "") {
|
if (machine->sshPublicHostKey != "") {
|
||||||
Path fileName = tmpDir + "/host-key";
|
Path fileName = tmpDir + "/host-key";
|
||||||
auto p = machine->sshName.find("@");
|
auto p = sshName.find("@");
|
||||||
std::string host = p != std::string::npos ? std::string(machine->sshName, p + 1) : machine->sshName;
|
std::string host = p != std::string::npos ? std::string(sshName, p + 1) : sshName;
|
||||||
writeFile(fileName, host + " " + machine->sshPublicHostKey + "\n");
|
writeFile(fileName, host + " " + machine->sshPublicHostKey + "\n");
|
||||||
append(argv, {"-oUserKnownHostsFile=" + fileName});
|
append(argv, {"-oUserKnownHostsFile=" + fileName});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue