aboutsummaryrefslogtreecommitdiff
path: root/src/nix/command.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-25 11:20:37 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-25 11:20:37 +0200
commitbcecc990071fd36bb88c8fd29cb009ed4c04d6a2 (patch)
treec3f2fa86b2d751418efe7727bc345d0557c3786c /src/nix/command.cc
parent1bb87c0487ba2a10f20c07dfd828b5d043249e31 (diff)
Restructure installables handling in the "nix" command
Diffstat (limited to 'src/nix/command.cc')
-rw-r--r--src/nix/command.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc
index a1b2c120a..4034de96c 100644
--- a/src/nix/command.cc
+++ b/src/nix/command.cc
@@ -79,6 +79,13 @@ StoreCommand::StoreCommand()
mkFlag(0, "store", "store-uri", "URI of the Nix store to use", &storeUri);
}
+ref<Store> StoreCommand::getStore()
+{
+ if (!_store)
+ _store = createStore();
+ return ref<Store>(_store);
+}
+
ref<Store> StoreCommand::createStore()
{
return openStore(storeUri);