Skip to main content

render_ref_parse_error

Function render_ref_parse_error 

Source
pub fn render_ref_parse_error(e: &RefParseError)
Expand description

The renderer on its own, for call sites holding a doiget_core::RefParseError that did not come from parse_ref_or_exit.

Both now take the exit code from fetch::cli_exit_code(InvalidRef), which is 2 since #492 / ADR-0049. Before that fetch fell to the generic _ => 1 arm while graph hard-coded the 2 that docs/ERRORS.md §4 prescribes, so one binary gave two answers for the same input and each site’s comment claimed agreement with the other.

One renderer and one exit code. every_ref_taking_command_exits_2_for_ an_invalid_ref is what keeps it that way.