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

Improve error message

This commit is contained in:
Eelco Dolstra 2015-03-06 14:24:08 +01:00
parent 9f3eb56b46
commit 5badc8f975
2 changed files with 25 additions and 19 deletions

View file

@ -200,15 +200,12 @@ string showAttrPath(const AttrPath & attrPath)
{
std::ostringstream out;
bool first = true;
foreach (AttrPath::const_iterator, i, attrPath) {
if (!first)
out << '.';
for (auto & i : attrPath) {
if (!first) out << '.'; else first = false;
if (i.symbol.set())
out << i.symbol;
else
first = false;
if (i->symbol.set())
out << i->symbol;
else
out << "\"${" << *i->expr << "}\"";
out << "\"${" << *i.expr << "}\"";
}
return out.str();
}