1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

checkRefs: use concatMapStringsSep

(cherry picked from commit 2b4d461c14)
This commit is contained in:
Robert Hensing 2025-01-18 09:58:17 +01:00 committed by Mergify
parent 0ddb8e21fe
commit 7b3a78dbab

View file

@ -2943,15 +2943,10 @@ void LocalDerivationGoal::checkOutputs(const std::map<std::string, ValidPathInfo
else if (auto output = get(outputs, i)) else if (auto output = get(outputs, i))
spec.insert(output->path); spec.insert(output->path);
else { else {
std::string allOutputs; std::string outputsListing = concatMapStringsSep(", ", outputs, [](auto & o) { return o.first; });
for (auto & o : outputs) {
if (! allOutputs.empty())
allOutputs.append(", ");
allOutputs.append(o.first);
}
throw BuildError("derivation '%s' output check for '%s' contains an illegal reference specifier '%s'," throw BuildError("derivation '%s' output check for '%s' contains an illegal reference specifier '%s',"
" expected store path or output name (one of [%s])", " expected store path or output name (one of [%s])",
worker.store.printStorePath(drvPath), outputName, i, allOutputs); worker.store.printStorePath(drvPath), outputName, i, outputsListing);
} }
} }