set verbosity level on config
This commit is contained in:
parent
2304ccccbe
commit
3dd9cc4ea9
2 changed files with 4 additions and 3 deletions
|
@ -13,7 +13,8 @@ pub mod validate_types;
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
pub input: Vec<PathBuf>,
|
pub input: Vec<PathBuf>,
|
||||||
pub output: HashMap<String, PathBuf>,
|
pub output: HashMap<String, PathBuf>,
|
||||||
pub title: String
|
pub title: String,
|
||||||
|
pub verbosity: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
|
|
|
@ -5,7 +5,6 @@ extern crate serde_derive;
|
||||||
|
|
||||||
extern crate serde_yaml;
|
extern crate serde_yaml;
|
||||||
|
|
||||||
|
|
||||||
mod args;
|
mod args;
|
||||||
mod config;
|
mod config;
|
||||||
mod process;
|
mod process;
|
||||||
|
@ -17,7 +16,8 @@ mod tests;
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = args::get_matches();
|
let args = args::get_matches();
|
||||||
if args.subcommand_name().unwrap() == "build" {
|
if args.subcommand_name().unwrap() == "build" {
|
||||||
let config = config::get_config();
|
let mut config = config::get_config();
|
||||||
|
config.verbosity = args::get_verbose(args);
|
||||||
process::build(config);
|
process::build(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue