use std::process;
use crate::config::{get_config, MyCommand, print_help_info};
use crate::runner::init::runner_init;
mod run;
mod init;
pub fn run() {
let conf = get_config().unwrap_or_else(|e| {
println!("参数解析异常: {}", e);
process::exit(1);
});
match conf.command {
MyCommand::INIT => {
runner_init(conf).unwrap_or_else(|e| {
println!("初始化异常: {e}");
process::exit(1);
})
}
MyCommand::RUN => {}
MyCommand::BUILD => {}
_ => { print_help_info() }
}
}