diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-03-16T13·25+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-03-16T13·25+0100 |
commit | 558eda01154d47b3c88983576eedb582185b2201 (patch) | |
tree | 7771c3d52fe63335115c6436ad8c6f007c8e0e55 /src/nix/command.cc | |
parent | 287084d688c3316d5840a9a7b5b2dff29b3dda94 (diff) |
nix copy: Make -r option use the "from" store
Previously, we tried to compute the closure in the local store, which obviously doesn't work.
Diffstat (limited to 'src/nix/command.cc')
-rw-r--r-- | src/nix/command.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc index 5a8288da912f..a1b2c120a5d9 100644 --- a/src/nix/command.cc +++ b/src/nix/command.cc @@ -79,9 +79,14 @@ StoreCommand::StoreCommand() mkFlag(0, "store", "store-uri", "URI of the Nix store to use", &storeUri); } +ref<Store> StoreCommand::createStore() +{ + return openStore(storeUri); +} + void StoreCommand::run() { - run(openStore(storeUri)); + run(createStore()); } StorePathsCommand::StorePathsCommand() |