mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
don't use table compaction in to nuon if not a table (#4671)
* don't use table compaction in to nuon if not a table * Make a proper nuon conversion test * more nuon tests
This commit is contained in:
@ -65,7 +65,7 @@ fn value_to_string(v: &Value, span: Span) -> Result<String, ShellError> {
|
||||
Value::Int { val, .. } => Ok(format!("{}", *val)),
|
||||
Value::List { vals, .. } => {
|
||||
let headers = get_columns(vals);
|
||||
if vals.iter().all(|x| x.columns() == headers) {
|
||||
if !headers.is_empty() && vals.iter().all(|x| x.columns() == headers) {
|
||||
// Table output
|
||||
let headers_output = headers.join(", ");
|
||||
|
||||
|
Reference in New Issue
Block a user