Skip to content

Commit

Permalink
doc: Explain return value
Browse files Browse the repository at this point in the history
  • Loading branch information
juanibiapina committed Jun 20, 2024
1 parent b5c23d3 commit cdab419
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ pub fn extract_usage(config: &Config, path: &Path, cmd: &str) -> Usage {
command = command.arg(Arg::new("args").trailing_var_arg(true).num_args(..).allow_hyphen_values(true));
}

// both command and error are returned because an invalid usage string doesn't prevent the
// command from being invoked, but it should be reported to the user
return Usage::new(command, error);
}

Expand Down

0 comments on commit cdab419

Please sign in to comment.