aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-06 19:01:05 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-10 11:27:29 +0200
commit95295482ea629fd21992f564b8e4f1710a7a61e6 (patch)
treebbb4cd93cf6bde70847f98b959318c55bfb4d50f /src/libstore
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')
-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 59348c5d0..53c802044 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))