diff --git a/crates/nu-command/src/filters/get.rs b/crates/nu-command/src/filters/get.rs index 2f9a863991..ba770d1e66 100644 --- a/crates/nu-command/src/filters/get.rs +++ b/crates/nu-command/src/filters/get.rs @@ -172,18 +172,8 @@ fn action( } } - match input { - PipelineData::Empty => return Err(ShellError::PipelineEmpty { dst_span: span }), - // Allow chaining of get -i - PipelineData::Value(val @ Value::Nothing { .. }, ..) if !ignore_errors => { - return Err(ShellError::OnlySupportsThisInputType { - exp_input_type: "table or record".into(), - wrong_type: "nothing".into(), - dst_span: span, - src_span: val.span(), - }); - } - _ => (), + if let PipelineData::Empty = input { + return Err(ShellError::PipelineEmpty { dst_span: span }); } if rest.is_empty() {