-// mod argument_parser;
mod configuration;
mod command;
mod constants;
mod post;
mod template;
mod utils;
+mod remote;
use std::iter::once;
use std::env::args;
use configuration::Configuration;
fn main() -> Result<()> {
+ let result = run();
+
+ if cfg!(debug_assertions) {
+ result
+ } else {
+ match result {
+ Ok(_) => Ok(()),
+ Err(e) => {
+ eprintln!("{}", e);
+ std::process::exit(1);
+ }
+ }
+ }
+}
+
+fn run() -> Result<()> {
let configuration = Configuration::new();
let commands = available_commands();
let arguments: Vec<String> = args().collect();