1 // Macros should be declared first
13 /// CLI argparsing definitions, using `clap`.
16 use error::{Error, Result};
17 use opts::{Opts, Subcommand};
18 use utils::{QuestionAction, QuestionPolicy};
20 // Used in BufReader and BufWriter to perform less syscalls
21 const BUFFER_CAPACITY: usize = 1024 * 32;
23 /// The status code returned from `ouch` on error
24 pub const EXIT_FAILURE: i32 = libc::EXIT_FAILURE;
27 if let Err(err) = run() {
29 std::process::exit(EXIT_FAILURE);
33 fn run() -> Result<()> {
34 let (args, skip_questions_positively, file_visibility_policy) = Opts::parse_args()?;
35 commands::run(args, skip_questions_positively, file_visibility_policy)