diff --git a/crates/nu-cli/src/data/files.rs b/crates/nu-cli/src/data/files.rs index 7351f96736..26cdbc597d 100644 --- a/crates/nu-cli/src/data/files.rs +++ b/crates/nu-cli/src/data/files.rs @@ -155,6 +155,8 @@ pub(crate) fn dir_entry_dict( } dict.insert_untagged("size", size_untagged_value); + } else { + dict.insert_untagged("size", UntaggedValue::nothing()); } if let Some(md) = metadata {