mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
checkRefs: use concatMapStringsSep
This commit is contained in:
parent
32898dc46a
commit
2b4d461c14
1 changed files with 2 additions and 7 deletions
|
@ -2992,15 +2992,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue