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::Error { .. } => input,
other => Value::error(
ShellError::OnlySupportsThisInputType {
exp_input_type: "string".into(),
wrong_type: other.get_type().to_string(),
dst_span: call.head,
src_span: other.span(),
ShellError::TypeMismatch {
err_message: format!("Can't convert {} to record", other.get_type()),
span: other.span(),
},
call.head,
),