aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/print.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/print.cc')
-rw-r--r--src/libexpr/print.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libexpr/print.cc b/src/libexpr/print.cc
index 6eb321c43..2ee11d9d3 100644
--- a/src/libexpr/print.cc
+++ b/src/libexpr/print.cc
@@ -277,13 +277,10 @@ private:
void printAttrs(Value & v, size_t depth)
{
- if (seen && !seen->insert(v.attrs).second) {
- printRepeated();
- return;
- }
-
if (options.force && options.derivationPaths && state.isDerivation(v)) {
printDerivation(v);
+ } else if (seen && !v.attrs->empty() && !seen->insert(v.attrs).second) {
+ printRepeated();
} else if (depth < options.maxDepth) {
increaseIndent();
output << "{";