1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-05 16:41:01 +01:00

Merge pull request #14674 from Mic92/ca-derivation

Fix crash when querying realisations without ca-derivations enabled
This commit is contained in:
John Ericson 2025-11-30 14:30:53 +00:00 committed by GitHub
commit d7c29383c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1629,6 +1629,10 @@ void LocalStore::queryRealisationUncached(
const DrvOutput & id, Callback<std::shared_ptr<const UnkeyedRealisation>> callback) noexcept
{
try {
if (!experimentalFeatureSettings.isEnabled(Xp::CaDerivations)) {
callback(nullptr);
return;
}
auto maybeRealisation = retrySQLite<std::optional<const UnkeyedRealisation>>(
[&]() { return queryRealisation_(*_state->lock(), id); });
if (maybeRealisation)