just/src/run.rs

22 lines
420 B
Rust
Raw Normal View History

use crate::common::*;
2016-10-23 16:43:52 -07:00
pub fn run() -> Result<(), i32> {
#[cfg(windows)]
ansi_term::enable_ansi_support().ok();
env_logger::Builder::from_env(
env_logger::Env::new()
.filter("JUST_LOG")
.write_style("JUST_LOG_STYLE"),
)
.init();
let app = Config::app();
let matches = app.get_matches();
2016-10-23 16:43:52 -07:00
let config = Config::from_matches(&matches).eprint(Color::auto())?;
config.run_subcommand()
2016-10-23 16:43:52 -07:00
}