Fix #5469, making $nothing or null convert to filesize of 0B (#5485)

This commit is contained in:
Justin Ma 2022-05-09 19:19:28 +08:00 committed by GitHub
parent 4052a99ff5
commit 7ee22603ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,10 @@ pub fn action(input: &Value, span: Span) -> Value {
}, },
Err(error) => Value::Error { error }, Err(error) => Value::Error { error },
}, },
Value::Nothing { .. } => Value::Filesize {
val: 0,
span: value_span,
},
_ => Value::Error { _ => Value::Error {
error: ShellError::UnsupportedInput( error: ShellError::UnsupportedInput(
"'into filesize' for unsupported type".into(), "'into filesize' for unsupported type".into(),