From d16fd2497374671c92cb877f9570d65783a77d99 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Oct 2017 15:16:18 +0200 Subject: Allow shorter syntax for chroot stores You can now say '--store /tmp/nix' instead of '--store local?root=/tmp/nix'. --- src/build-remote/build-remote.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/build-remote/build-remote.cc') diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 419e7205372b..6e05e165545d 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(); -- cgit 1.4.1