mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Don't crash when copying realisations to a non-ca remote
Rather throw a proper exception, and catch&log it on the client side
This commit is contained in:
parent
aead35531a
commit
f67ff1f575
4 changed files with 33 additions and 7 deletions
|
@ -794,8 +794,18 @@ std::map<StorePath, StorePath> copyPaths(ref<Store> srcStore, ref<Store> dstStor
|
|||
realisations.insert(*realisation);
|
||||
}
|
||||
auto pathsMap = copyPaths(srcStore, dstStore, storePaths, repair, checkSigs, substitute);
|
||||
for (auto& realisation : realisations) {
|
||||
dstStore->registerDrvOutput(realisation);
|
||||
try {
|
||||
for (auto& realisation : realisations) {
|
||||
dstStore->registerDrvOutput(realisation);
|
||||
}
|
||||
} catch (MissingExperimentalFeature & e) {
|
||||
// Don't fail if the remote doesn't support CA derivations is it might
|
||||
// not be whithin our control to change that, and we might still want
|
||||
// to at least copy the output paths.
|
||||
if (e.missingFeature == "ca-derivations")
|
||||
ignoreException();
|
||||
else
|
||||
throw;
|
||||
}
|
||||
|
||||
return pathsMap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue