From 95295482ea629fd21992f564b8e4f1710a7a61e6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 6 Apr 2017 19:01:05 +0200 Subject: Allow "auto" as a store URI Using the empty string is likely to be ambiguous in some contexts. --- src/libstore/store-api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore') 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)) -- cgit v1.2.3