use colored::*;
use log::{info, Level};
use reef::{Command, History, LogFormat};
use std::collections::HashMap;
use std::error::Error;
use std::result::Result;
fn main() -> Result<(), Box<dyn Error>> {
reef::logger::init(Level::Info, LogFormat::Message, HashMap::new())?;
info!("{}", "");
info!("{}{}", "executing a few commands".yellow(), "...".clear());
Command::new("git --version", &std::env::temp_dir()).exec()?;
match Command::new(
"git clone https:://gitlab.com/crates-rs/not.there.git",
&std::env::temp_dir(),
)
.exec()
{
Ok(_c) => panic!("did not expect 'git clone...' to succeed"),
Err(e) => {
info!("error:");
info!("{}", e)
}
};
Ok(())
}