Merge pull request #1383 from matthiasbeyer/libimagrt/handler-exit-if-subcommand-not-found
libimagrt: Exit if handler does not find subcommand
This commit is contained in:
commit
c27dc79afe
1 changed files with 8 additions and 2 deletions
|
@ -520,10 +520,16 @@ impl<'a> Runtime<'a> {
|
|||
/// 3. The `ArgMatches` object from the call, so that this routine can forward all flags passed
|
||||
/// to the `bar` subcommand.
|
||||
///
|
||||
/// # Warning
|
||||
///
|
||||
/// If, and only if, the subcommand does not exist (as in `::std::io::ErrorKind::NotFound`),
|
||||
/// this function exits with 1 as exit status.
|
||||
///
|
||||
/// # Return value
|
||||
///
|
||||
/// On success, the exit status object of the `Command` invocation is returned.
|
||||
/// On Error, a RuntimeError object is returned.
|
||||
/// On Error, a RuntimeError object is returned. This is also the case if writing the error
|
||||
/// message does not work.
|
||||
///
|
||||
/// # Details
|
||||
///
|
||||
|
@ -573,7 +579,7 @@ impl<'a> Runtime<'a> {
|
|||
return e;
|
||||
}
|
||||
|
||||
e
|
||||
::std::process::exit(1)
|
||||
},
|
||||
_ => e,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue