mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
* `nix-instantiate --{eval|parse}-only --xml': print an XML
representation instead of an ATerm. * Indent XML output.
This commit is contained in:
parent
fe101fa785
commit
18e4ac0fc6
5 changed files with 82 additions and 13 deletions
|
@ -804,7 +804,7 @@ static void opQuery(Globals & globals,
|
|||
/* Print the desired columns, or XML output. */
|
||||
Table table;
|
||||
ostringstream dummy;
|
||||
XMLWriter xml(*(xmlOutput ? &cout : &dummy));
|
||||
XMLWriter xml(true, *(xmlOutput ? &cout : &dummy));
|
||||
XMLOpenElement xmlRoot(xml, "items");
|
||||
|
||||
for (vector<DrvInfo>::iterator i = elems2.begin();
|
||||
|
@ -903,10 +903,9 @@ static void opQuery(Globals & globals,
|
|||
columns.push_back(descr);
|
||||
}
|
||||
|
||||
if (xmlOutput) {
|
||||
if (xmlOutput)
|
||||
xml.writeEmptyElement("item", attrs);
|
||||
xml.writeCharData("\n");
|
||||
} else
|
||||
else
|
||||
table.push_back(columns);
|
||||
|
||||
} catch (AssertionError & e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue