mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 04:45:04 +02:00
Mention the actual output type on an OutputMismatch error (#13355)
# Description This improves the error when the determined output of a custom command doesn't match the specified output type by adding the actual determined output type. # User-Facing Changes Previous: `command doesn't output {0}` New: `expected {0}, but command outputs {1}` # Tests + Formatting Passing. # After Submitting - [ ] release notes? (minor change, but helpful)
This commit is contained in:
@ -1055,7 +1055,11 @@ pub fn check_block_input_output(working_set: &StateWorkingSet, block: &Block) ->
|
||||
.span
|
||||
};
|
||||
|
||||
output_errors.push(ParseError::OutputMismatch(output_type.clone(), span))
|
||||
output_errors.push(ParseError::OutputMismatch(
|
||||
output_type.clone(),
|
||||
current_output_type.clone(),
|
||||
span,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user