Open emmatebibyte opened 9 months ago
diff --git a/src/cli/mod.rs b/src/cli/mod.rs index b28d59d..021a4d7 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -69,8 +69,10 @@ pub fn parse_cli_args() -> (String, Config) { let input_text: String = if opts.file.is_some() { read_and_parse_file(opts.file.unwrap()) } else { - opts.text - .expect("Error. No input was provided. Please use ares --help") + opts.text.unwrap_or_else(|| { + eprintln!("Error. No input was provided. Please use ares --help"); + std::process::exit(1); + }) }; // Fixes bug where opts.text and opts.file are partially borrowed