Handle custom values in describe command (#5248)

This commit is contained in:
Reilly Wood 2022-04-19 21:59:53 -07:00 committed by GitHub
parent b501db673a
commit 7e97be1dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,8 +35,13 @@ impl Command for Describe {
))
} else {
let value = input.into_value(call.head);
let description = match value {
Value::CustomValue { val, .. } => val.value_string(),
_ => value.get_type().to_string(),
};
Ok(Value::String {
val: value.get_type().to_string(),
val: description,
span: head,
}
.into_pipeline_data())