forked from extern/nushell
fix labelled error from shell error (#10639)
# Description Fixes a minor error in the impl From<ShellError> for LabeledError. # User-Facing Changes # Tests + Formatting # After Submitting
This commit is contained in:
parent
4efccb2b1c
commit
bcf3537395
@ -75,12 +75,12 @@ impl From<ShellError> for LabeledError {
|
|||||||
help: _help,
|
help: _help,
|
||||||
} => LabeledError {
|
} => LabeledError {
|
||||||
label: format!("Can't convert to {expected}"),
|
label: format!("Can't convert to {expected}"),
|
||||||
msg: format!("can't convert {expected} to {input}"),
|
msg: format!("can't convert from {input} to {expected}"),
|
||||||
span: Some(span),
|
span: Some(span),
|
||||||
},
|
},
|
||||||
ShellError::DidYouMean(suggestion, span) => LabeledError {
|
ShellError::DidYouMean(suggestion, span) => LabeledError {
|
||||||
label: "Name not found".into(),
|
label: "Name not found".into(),
|
||||||
msg: format!("did you mean '{suggestion}'"),
|
msg: format!("did you mean '{suggestion}'?"),
|
||||||
span: Some(span),
|
span: Some(span),
|
||||||
},
|
},
|
||||||
ShellError::PluginFailedToLoad(msg) => LabeledError {
|
ShellError::PluginFailedToLoad(msg) => LabeledError {
|
||||||
|
Loading…
Reference in New Issue
Block a user