mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:15:41 +02:00
use abbreviated string instead of debug string for DatetimeParseError
s (#12517)
Resolves #12444. Prevents debug string from being printed out. --------- Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
@ -153,9 +153,11 @@ fn format_helper(value: Value, formatter: &str, formatter_span: Span, head_span:
|
||||
}
|
||||
}
|
||||
_ => Value::error(
|
||||
ShellError::DatetimeParseError {
|
||||
msg: value.to_debug_string(),
|
||||
span: head_span,
|
||||
ShellError::OnlySupportsThisInputType {
|
||||
exp_input_type: "date, string (that represents datetime)".into(),
|
||||
wrong_type: value.get_type().to_string(),
|
||||
dst_span: head_span,
|
||||
src_span: value.span(),
|
||||
},
|
||||
head_span,
|
||||
),
|
||||
@ -174,9 +176,11 @@ fn format_helper_rfc2822(value: Value, span: Span) -> Value {
|
||||
}
|
||||
}
|
||||
_ => Value::error(
|
||||
ShellError::DatetimeParseError {
|
||||
msg: value.to_debug_string(),
|
||||
span,
|
||||
ShellError::OnlySupportsThisInputType {
|
||||
exp_input_type: "date, string (that represents datetime)".into(),
|
||||
wrong_type: value.get_type().to_string(),
|
||||
dst_span: span,
|
||||
src_span: val_span,
|
||||
},
|
||||
span,
|
||||
),
|
||||
|
Reference in New Issue
Block a user