From cb1b32cda178f11044806e81e9c0bb7781c4e931 Mon Sep 17 00:00:00 2001 From: Nathan Ross Date: Sat, 13 Aug 2016 22:46:59 -0400 Subject: [PATCH] uucore: fix utility name in coreopts parsing error messages --- src/uucore/coreopts.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/uucore/coreopts.rs b/src/uucore/coreopts.rs index ec22af9dd..ced6b0dcc 100644 --- a/src/uucore/coreopts.rs +++ b/src/uucore/coreopts.rs @@ -41,7 +41,9 @@ impl<'a> CoreOptions<'a> { let matches = match self.options.parse(&args[1..]) { Ok(m) => { Some(m) }, 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(); if matches.opt_present("help") {