Normalize some error messages

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
Théophane Hufschmitt 2021-02-04 14:47:28 +01:00 committed by GitHub
parent 9355ecd543
commit ca8facefb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -724,14 +724,13 @@ std::set<RealisedPath> toRealisedPaths(
if (settings.isExperimentalFeatureEnabled("ca-derivations")) { if (settings.isExperimentalFeatureEnabled("ca-derivations")) {
if (!outputHashes.count(output.first)) if (!outputHashes.count(output.first))
throw Error( throw Error(
"The derivation %s doesn't have an output " "the derivation '%s' doesn't have an output named '%s'",
"named %s",
store->printStorePath(bfd.drvPath), store->printStorePath(bfd.drvPath),
output.first); output.first);
auto outputId = DrvOutput{outputHashes.at(output.first), output.first}; auto outputId = DrvOutput{outputHashes.at(output.first), output.first};
auto realisation = store->queryRealisation(outputId); auto realisation = store->queryRealisation(outputId);
if (!realisation) if (!realisation)
throw Error("Cannot operate on output of unbuilt CA drv %s", outputId.to_string()); throw Error("cannot operate on an output of unbuilt content-addresed derivation '%s'", outputId.to_string());
res.insert(RealisedPath{*realisation}); res.insert(RealisedPath{*realisation});
} }
else { else {