From d93315d8f54f002f94a65b42464847c8ed36fdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan?= Date: Wed, 25 Oct 2023 15:04:37 +0200 Subject: [PATCH] Fix `describe -d` for lazy records (#10836) # Description This PR fixes an overlook from a previous PR. It now correctly returns the details on lazy records. # User-Facing Changes Describe detailed now returns the expected result. --- crates/nu-cmd-lang/src/core_commands/describe.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/nu-cmd-lang/src/core_commands/describe.rs b/crates/nu-cmd-lang/src/core_commands/describe.rs index 7445395287..6f77c42bc8 100644 --- a/crates/nu-cmd-lang/src/core_commands/describe.rs +++ b/crates/nu-cmd-lang/src/core_commands/describe.rs @@ -397,6 +397,7 @@ fn describe_value( describe_value(val.vals[i].clone(), head, engine_state, call)?, ); } + record.push("columns", Value::record(record_cols, head)); } else { let cols = val.column_names(); record.push("length", Value::int(cols.len() as i64, head)); @@ -406,7 +407,7 @@ fn describe_value( record.push("length", Value::int(cols.len() as i64, head)); } - Value::record(record!(), head) + Value::record(record, head) } }) }