mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Input::getAccessor(): Get the fingerprint from the final accessor
Fixes an issue reported by @erikarvstedt where InputAccessor::fetchToStore() wouldn't cache the store path the first time.
This commit is contained in:
parent
1483c56582
commit
7317196807
2 changed files with 2 additions and 1 deletions
|
@ -130,6 +130,7 @@ struct CacheImpl : Cache
|
||||||
std::string_view key,
|
std::string_view key,
|
||||||
std::string_view value) override
|
std::string_view value) override
|
||||||
{
|
{
|
||||||
|
debug("upserting fact '%s' -> '%s'", key, value);
|
||||||
_state.lock()->upsertFact.use()
|
_state.lock()->upsertFact.use()
|
||||||
(key)
|
(key)
|
||||||
(value).exec();
|
(value).exec();
|
||||||
|
|
|
@ -162,7 +162,7 @@ std::pair<ref<InputAccessor>, Input> Input::getAccessor(ref<Store> store) const
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto [accessor, final] = scheme->getAccessor(store, *this);
|
auto [accessor, final] = scheme->getAccessor(store, *this);
|
||||||
accessor->fingerprint = scheme->getFingerprint(store, *this);
|
accessor->fingerprint = scheme->getFingerprint(store, final);
|
||||||
checkLocks(final);
|
checkLocks(final);
|
||||||
return {accessor, std::move(final)};
|
return {accessor, std::move(final)};
|
||||||
} catch (Error & e) {
|
} catch (Error & e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue