Skip to content

Commit

Permalink
base: set exit code to 1 for clap errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tertsdiepraam committed May 1, 2022
1 parent 77f1e18 commit bd85c62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/base32/src/base_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::io::{stdout, Read, Write};

use uucore::display::Quotable;
use uucore::encoding::{wrap_print, Data, Format};
use uucore::error::{FromIo, UResult, USimpleError, UUsageError};
use uucore::error::{FromIo, UClapError, UResult, USimpleError, UUsageError};
use uucore::{format_usage, InvalidEncodingHandling};

use std::fs::File;
Expand Down Expand Up @@ -90,7 +90,7 @@ pub fn parse_base_cmd_args(args: impl uucore::Args, about: &str, usage: &str) ->
let arg_list = args
.collect_str(InvalidEncodingHandling::ConvertLossy)
.accept_any();
Config::from(&command.get_matches_from(arg_list))
Config::from(&command.try_get_matches_from(arg_list)?)
}

pub fn base_app<'a>(about: &'a str, usage: &'a str) -> Command<'a> {
Expand Down

0 comments on commit bd85c62

Please sign in to comment.