Fix wrong error for raw streams in into record (#11668)

Fix #11632
This commit is contained in:
Andrej Kolchin 2024-01-29 14:32:43 +00:00 committed by GitHub
parent eea3f79c3c
commit 427857a78e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,11 +138,9 @@ fn into_record(
Value::Record { val, .. } => Value::record(val, span), Value::Record { val, .. } => Value::record(val, span),
Value::Error { .. } => input, Value::Error { .. } => input,
other => Value::error( other => Value::error(
ShellError::OnlySupportsThisInputType { ShellError::TypeMismatch {
exp_input_type: "string".into(), err_message: format!("Can't convert {} to record", other.get_type()),
wrong_type: other.get_type().to_string(), span: other.span(),
dst_span: call.head,
src_span: other.span(),
}, },
call.head, call.head,
), ),