From eff7f330867aaf3dc5a739ea3a49b5e06124eaf9 Mon Sep 17 00:00:00 2001 From: Raphael Gaschignard Date: Sat, 4 May 2024 01:12:43 +1000 Subject: [PATCH] Report errors that occur on file operations in ls (#12033) Currently errors just create empty entries inside of resulting dataframes. This changeset is meant to help debug #12004, though generally speaking I do think it's worth having ways to make errors be visible in this kind of pipeline be visible An example of what this looks like image --- crates/nu-command/src/filesystem/ls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/filesystem/ls.rs b/crates/nu-command/src/filesystem/ls.rs index 762c8d300d..9d8db0a8c6 100644 --- a/crates/nu-command/src/filesystem/ls.rs +++ b/crates/nu-command/src/filesystem/ls.rs @@ -431,7 +431,7 @@ fn ls_for_one_pattern( Err(err) => Some(Value::error(err, call_span)), } } - _ => Some(Value::nothing(call_span)), + Err(err) => Some(Value::error(err, call_span)), }))) }