mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
nix copy: Move --from / --to check
This means you now get an error message *before* stuff gets built: $ nix copy .#hydraJobs.vendoredCrates error: you must pass '--from' and/or '--to' Try 'nix --help' for more information.
This commit is contained in:
parent
70bcd6a55c
commit
9c4e05766b
1 changed files with 6 additions and 1 deletions
|
@ -80,11 +80,16 @@ struct CmdCopy : StorePathsCommand
|
|||
return srcUri.empty() ? StoreCommand::createStore() : openStore(srcUri);
|
||||
}
|
||||
|
||||
void run(ref<Store> srcStore, StorePaths storePaths) override
|
||||
void run(ref<Store> store) override
|
||||
{
|
||||
if (srcUri.empty() && dstUri.empty())
|
||||
throw UsageError("you must pass '--from' and/or '--to'");
|
||||
|
||||
StorePathsCommand::run(store);
|
||||
}
|
||||
|
||||
void run(ref<Store> srcStore, StorePaths storePaths) override
|
||||
{
|
||||
ref<Store> dstStore = dstUri.empty() ? openStore() : openStore(dstUri);
|
||||
|
||||
copyPaths(srcStore, dstStore, storePathsToSet(storePaths),
|
||||
|
|
Loading…
Reference in a new issue