diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-04-25T09·20+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-04-25T09·20+0200 |
commit | bcecc990071fd36bb88c8fd29cb009ed4c04d6a2 (patch) | |
tree | c3f2fa86b2d751418efe7727bc345d0557c3786c /src/nix/command.cc | |
parent | 1bb87c0487ba2a10f20c07dfd828b5d043249e31 (diff) |
Restructure installables handling in the "nix" command
Diffstat (limited to 'src/nix/command.cc')
-rw-r--r-- | src/nix/command.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc index a1b2c120a5d9..4034de96c162 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); |