Highlight source value as well as failure point. (#6442)

* show multiple errors at once for some commands

* change from invalid item to source value
This commit is contained in:
WindSoilder
2022-09-01 18:20:22 +08:00
committed by GitHub
parent e266590813
commit fbe9d6f529
6 changed files with 45 additions and 18 deletions

View File

@ -785,7 +785,7 @@ Either make sure {0} is a string, or add a 'to_string' entry for it in ENV_CONVE
/// Failed to eval block with specific pipeline input.
#[error("Eval block failed with pipeline input")]
#[diagnostic(code(nu::shell::eval_block_with_input), url(docsrs))]
EvalBlockWithInput(#[label("Invalid item")] Span, #[related] Vec<ShellError>),
EvalBlockWithInput(#[label("source value")] Span, #[related] Vec<ShellError>),
}
impl From<std::io::Error> for ShellError {