mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 09:38:22 +02:00
Replace some PipelineMismatch by OnlySupportsThisInputType by shell error (#15447)
sub-issue of #10698 according to @sholderbach (Description largely edited, since the scope of the PR changed) # Description Context: `ShellError::OnlySupportsThisInputType` was a duplicate of `ShellError::PipelineMismatch` so I - replaced some occurences of PipelineMismatch by OnlySupportsThisInputType For another PR - replace the remaining occurences - removed OnlySupportsThisInputType from nu-protocol # User-Facing Changes The error message will be different -> but consistent # Tests + Formatting OK # After Submitting Nothing required
This commit is contained in:
@ -159,9 +159,10 @@ where
|
||||
}
|
||||
(Value::Binary { .. }, Value::Int { .. }) | (Value::Int { .. }, Value::Binary { .. }) => {
|
||||
Value::error(
|
||||
ShellError::PipelineMismatch {
|
||||
ShellError::OnlySupportsThisInputType {
|
||||
exp_input_type: "input, and argument, to be both int or both binary"
|
||||
.to_string(),
|
||||
wrong_type: "int and binary".to_string(),
|
||||
dst_span: rhs.span(),
|
||||
src_span: span,
|
||||
},
|
||||
|
Reference in New Issue
Block a user