about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-01-31T09·19+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-01-31T09·28+0100
commit9e7c1a4bbdbe6129dd9dc385776612c307d3d1bb (patch)
tree4c213493e9c6fa1045df1b4192061602e31c78eb /src/libstore/remote-store.cc
parent4fa08f3edb413e65816441acfb6c3befee730a06 (diff)
Use the daemon when we don't have write access to the Nix database
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 262e4650bfb5..679210d4cb16 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -50,14 +50,8 @@ void RemoteStore::openConnection(bool reserveSpace)
     if (initialised) return;
     initialised = true;
 
-    string remoteMode = getEnv("NIX_REMOTE");
-
-    if (remoteMode == "daemon")
-        /* Connect to a daemon that does the privileged work for
-           us. */
-        connectToDaemon();
-    else
-        throw Error(format("invalid setting for NIX_REMOTE, ‘%1%’") % remoteMode);
+    /* Connect to a daemon that does the privileged work for us. */
+    connectToDaemon();
 
     from.fd = fdSocket;
     to.fd = fdSocket;