aboutsummaryrefslogtreecommitdiff
path: root/src/build-remote/build-remote.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/build-remote/build-remote.cc')
-rw-r--r--src/build-remote/build-remote.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index 419e72053..6e05e1655 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -176,9 +176,13 @@ int main (int argc, char * * argv)
Activity act(*logger, lvlTalkative, actUnknown, fmt("connecting to '%s'", bestMachine->storeUri));
- Store::Params storeParams{{"max-connections", "1"}, {"log-fd", "4"}};
- if (bestMachine->sshKey != "")
- storeParams["ssh-key"] = bestMachine->sshKey;
+ Store::Params storeParams;
+ if (hasPrefix(storeUri, "ssh://")) {
+ storeParams["max-connections"] ="1";
+ storeParams["log-fd"] = "4";
+ if (bestMachine->sshKey != "")
+ storeParams["ssh-key"] = bestMachine->sshKey;
+ }
sshStore = openStore(bestMachine->storeUri, storeParams);
sshStore->connect();