mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
tty: correct exit code for wrong args
This commit is contained in:
parent
d8d0078dde
commit
3c271304f5
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue