Allow "auto" as a store URI

Using the empty string is likely to be ambiguous in some contexts.
This commit is contained in:
Eelco Dolstra 2017-04-06 19:01:05 +02:00
parent d8ff3aaae7
commit 95295482ea
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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))