about summary refs log tree commit diff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-06T17·01+0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-10T09·27+0200
commit95295482ea629fd21992f564b8e4f1710a7a61e6 (patch)
treebbb4cd93cf6bde70847f98b959318c55bfb4d50f /src/libstore/store-api.cc
parentd8ff3aaae7167e22d0c0f4f55ac9da8fb6655f1f (diff)
Allow "auto" as a store URI
Using the empty string is likely to be ambiguous in some contexts.
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 59348c5d0b..53c802044e 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -731,7 +731,7 @@ StoreType getStoreType(const std::string & uri, const std::string & stateDir)
         return tDaemon;
     } else if (uri == "local") {
         return tLocal;
-    } else if (uri == "") {
+    } else if (uri == "" || uri == "auto") {
         if (access(stateDir.c_str(), R_OK | W_OK) == 0)
             return tLocal;
         else if (pathExists(settings.nixDaemonSocketFile))