From 7ee22603ac16badb850ebdf29fabe76165c0c89b Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 9 May 2022 19:19:28 +0800 Subject: [PATCH] Fix #5469, making $nothing or null convert to filesize of 0B (#5485) --- crates/nu-command/src/conversions/into/filesize.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/nu-command/src/conversions/into/filesize.rs b/crates/nu-command/src/conversions/into/filesize.rs index dccc75170..646a9bcb9 100644 --- a/crates/nu-command/src/conversions/into/filesize.rs +++ b/crates/nu-command/src/conversions/into/filesize.rs @@ -133,6 +133,10 @@ pub fn action(input: &Value, span: Span) -> Value { }, Err(error) => Value::Error { error }, }, + Value::Nothing { .. } => Value::Filesize { + val: 0, + span: value_span, + }, _ => Value::Error { error: ShellError::UnsupportedInput( "'into filesize' for unsupported type".into(),