1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-05 07:27:46 +00:00

uucore: fix utility name in coreopts parsing error messages

This commit is contained in:
Nathan Ross 2016-08-13 22:46:59 -04:00 committed by Roy Ivy III
parent 1dab4510b5
commit 35951ebf66

View file

@ -41,7 +41,9 @@ impl<'a> CoreOptions<'a> {
let matches = match self.options.parse(&args[1..]) { let matches = match self.options.parse(&args[1..]) {
Ok(m) => { Some(m) }, Ok(m) => { Some(m) },
Err(f) => { Err(f) => {
crash!(1, "{}", f); pipe_write!(&mut ::std::io::stderr(), "{}: error: ", self.help_text.name);
pipe_writeln!(&mut ::std::io::stderr(), "{}", f);
::std::process::exit(1);
} }
}.unwrap(); }.unwrap();
if matches.opt_present("help") { if matches.opt_present("help") {