diff options
Diffstat (limited to 'src/libexpr/print.cc')
-rw-r--r-- | src/libexpr/print.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc index 2ee11d9d3..b7ff50f48 100644 --- a/src/libexpr/print.cc +++ b/src/libexpr/print.cc @@ -281,7 +281,7 @@ private: printDerivation(v); } else if (seen && !v.attrs->empty() && !seen->insert(v.attrs).second) { printRepeated(); - } else if (depth < options.maxDepth) { + } else if (depth < options.maxDepth || v.attrs->empty()) { increaseIndent(); output << "{"; @@ -355,7 +355,7 @@ private: return; } - if (depth < options.maxDepth) { + if (depth < options.maxDepth || v.listSize() == 0) { increaseIndent(); output << "["; auto listItems = v.listItems(); |