Do not display the help in red for fconv
This commit is contained in:
parent
70142ba64f
commit
e8ae8a8798
|
@ -25,9 +25,7 @@ enum SubCommands {
|
|||
SimpleTIM(reduced_tim::Arguments)
|
||||
}
|
||||
|
||||
fn run_main() -> Result<(), Error> {
|
||||
match CommandLine::try_parse() {
|
||||
Ok(cmd) => {
|
||||
fn run_main(cmd: CommandLine) -> Result<(), Error> {
|
||||
let mut input = tool_helper::open_input(cmd.input_file)?;
|
||||
let mut buffer = Vec::<u8>::new();
|
||||
let mut output_file = tool_helper::open_output(cmd.output_file)?;
|
||||
|
@ -57,18 +55,15 @@ fn run_main() -> Result<(), Error> {
|
|||
}
|
||||
|
||||
Ok(())
|
||||
},
|
||||
Err(error) => Err({
|
||||
let mut error = Error::from_error(error);
|
||||
|
||||
error.exit_code = 0;
|
||||
error
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if let Err(error) = run_main() {
|
||||
match CommandLine::try_parse() {
|
||||
Ok(cmd) => {
|
||||
if let Err(error) = run_main(cmd) {
|
||||
exit_with_error(error);
|
||||
}
|
||||
},
|
||||
Err(error) => eprintln!("{}", error)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue