Improved labeled error from plugins (#437)

* improved labeled error from plugins

* corrected span
This commit is contained in:
Fernando Herrera
2021-12-05 03:11:19 +00:00
committed by GitHub
parent 03e22b071a
commit 22469a9cb1
24 changed files with 611 additions and 208 deletions

View File

@ -87,7 +87,7 @@ impl Command for Kill {
left_span: call
.get_named_arg("force")
.ok_or_else(|| {
ShellError::LabeledError(
ShellError::SpannedLabeledError(
"Flag error".into(),
"flag force not found".into(),
call.head,
@ -98,7 +98,7 @@ impl Command for Kill {
right_span: span(&[
call.get_named_arg("signal")
.ok_or_else(|| {
ShellError::LabeledError(
ShellError::SpannedLabeledError(
"Flag error".into(),
"flag signal not found".into(),
call.head,