Fix the error message in case of a missing realisation

Don’t say that the derivation is CA as it might happen on a non-ca
derivation too.

Technically we could always recover _something_ for a purely
input-addressed derivation (like we already do when the `ca-derivations`
xp feature isn’t enabled), but it seems better to consistently fail −
the end-result wouldn’t really make sense anyways in most cases.
This commit is contained in:
Théophane Hufschmitt 2022-04-21 09:26:45 +02:00
parent 9345b4e9ca
commit 445ddebde5

View file

@ -831,8 +831,8 @@ std::vector<std::pair<std::shared_ptr<Installable>, BuiltPath>> Installable::bui
auto realisation = store->queryRealisation(outputId); auto realisation = store->queryRealisation(outputId);
if (!realisation) if (!realisation)
throw Error( throw Error(
"cannot operate on an output of unbuilt " "cannot operate on an output of the "
"content-addressed derivation '%s'", "unbuilt derivation '%s'",
outputId.to_string()); outputId.to_string());
outputs.insert_or_assign(output, realisation->outPath); outputs.insert_or_assign(output, realisation->outPath);
} else { } else {