1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

* Refactoring.

This commit is contained in:
Eelco Dolstra 2006-12-04 13:28:14 +00:00
parent 052b6fb149
commit f5f0cf423f
3 changed files with 33 additions and 17 deletions

View file

@ -137,12 +137,10 @@ boost::shared_ptr<StoreAPI> store;
boost::shared_ptr<StoreAPI> openStore(bool reserveSpace)
{
string mode = getEnv("NIX_REMOTE");
if (mode == "")
if (getEnv("NIX_REMOTE") == "")
return boost::shared_ptr<StoreAPI>(new LocalStore(reserveSpace));
else if (mode == "slave")
else
return boost::shared_ptr<StoreAPI>(new RemoteStore());
else throw Error(format("invalid setting for NIX_REMOTE, `%1%'") % mode);
}