mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tty: correct exit code for wrong args
This commit is contained in:
@@ -44,7 +44,15 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||
.help("print nothing, only return an exit status")
|
||||
.required(false),
|
||||
)
|
||||
.get_matches_from(args);
|
||||
.get_matches_from_safe(args);
|
||||
|
||||
let matches = match matches {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
eprint!("{}", e);
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let silent = matches.is_present(options::SILENT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user