aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcmd/installables.cc6
-rw-r--r--src/libexpr/eval-cache.cc4
-rw-r--r--src/libexpr/eval-cache.hh2
3 files changed, 8 insertions, 4 deletions
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc
index 5d3026c1a..e15addfae 100644
--- a/src/libcmd/installables.cc
+++ b/src/libcmd/installables.cc
@@ -503,7 +503,11 @@ std::tuple<std::string, FlakeRef, InstallableValue::DerivationInfo> InstallableF
auto root = cache->getRoot();
for (auto & attrPath : getActualAttrPaths()) {
- auto attr = root->findAlongAttrPath(parseAttrPath(*state, attrPath));
+ auto attr = root->findAlongAttrPath(
+ parseAttrPath(*state, attrPath),
+ true
+ );
+
if (!attr) continue;
if (!attr->isDerivation())
diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc
index 98d91c905..d7e21783d 100644
--- a/src/libexpr/eval-cache.cc
+++ b/src/libexpr/eval-cache.cc
@@ -486,11 +486,11 @@ std::shared_ptr<AttrCursor> AttrCursor::getAttr(std::string_view name)
return getAttr(root->state.symbols.create(name));
}
-std::shared_ptr<AttrCursor> AttrCursor::findAlongAttrPath(const std::vector<Symbol> & attrPath)
+std::shared_ptr<AttrCursor> AttrCursor::findAlongAttrPath(const std::vector<Symbol> & attrPath, bool force)
{
auto res = shared_from_this();
for (auto & attr : attrPath) {
- res = res->maybeGetAttr(attr);
+ res = res->maybeGetAttr(attr, force);
if (!res) return {};
}
return res;
diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/eval-cache.hh
index e23e45c94..43b34ebcb 100644
--- a/src/libexpr/eval-cache.hh
+++ b/src/libexpr/eval-cache.hh
@@ -102,7 +102,7 @@ public:
std::shared_ptr<AttrCursor> getAttr(std::string_view name);
- std::shared_ptr<AttrCursor> findAlongAttrPath(const std::vector<Symbol> & attrPath);
+ std::shared_ptr<AttrCursor> findAlongAttrPath(const std::vector<Symbol> & attrPath, bool force = false);
std::string getString();