aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-14 15:24:04 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-16 20:56:02 +0200
commitdffc3fe43bd3cbf95945065ee7822727b9fcea90 (patch)
tree59fed7f807945b9609c4126a550ec1a5c26890c7 /src
parente4bd42f98f7da0ac49cdea579d1e43be64c0621f (diff)
nix copy: Add --no-check-sigs flag
Diffstat (limited to 'src')
-rw-r--r--src/nix/copy.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nix/copy.cc b/src/nix/copy.cc
index 9f1a80d07..d9e6c9493 100644
--- a/src/nix/copy.cc
+++ b/src/nix/copy.cc
@@ -12,10 +12,17 @@ struct CmdCopy : StorePathsCommand
{
std::string srcUri, dstUri;
+ CheckSigsFlag checkSigs = CheckSigs;
+
CmdCopy()
{
mkFlag(0, "from", "store-uri", "URI of the source Nix store", &srcUri);
mkFlag(0, "to", "store-uri", "URI of the destination Nix store", &dstUri);
+
+ mkFlag()
+ .longName("no-check-sigs")
+ .description("do not require that paths are signed by trusted keys")
+ .handler([&](Strings ss) { checkSigs = NoCheckSigs; });
}
std::string name() override
@@ -50,7 +57,8 @@ struct CmdCopy : StorePathsCommand
ref<Store> dstStore = dstUri.empty() ? openStore() : openStore(dstUri);
- copyPaths(srcStore, dstStore, PathSet(storePaths.begin(), storePaths.end()));
+ copyPaths(srcStore, dstStore, PathSet(storePaths.begin(), storePaths.end()),
+ NoRepair, checkSigs);
}
};