diff --git a/libimagrt/src/configuration.rs b/libimagrt/src/configuration.rs index f5f06662..71df589a 100644 --- a/libimagrt/src/configuration.rs +++ b/libimagrt/src/configuration.rs @@ -156,6 +156,13 @@ impl Configuration { &self.config } + pub fn store_config(&self) -> Option<&Value> { + match &self.config { + &Value::Table(ref tabl) => tabl.get("store"), + _ => None, + } + } + } fn get_verbosity(v: &Value) -> bool { diff --git a/libimagrt/src/runtime.rs b/libimagrt/src/runtime.rs index a1cbc63d..053fc408 100644 --- a/libimagrt/src/runtime.rs +++ b/libimagrt/src/runtime.rs @@ -68,7 +68,14 @@ impl<'a> Runtime<'a> { Some(cfg.unwrap()) }; - Store::new(storepath).map(|store| { + let store_config = { + match &cfg { + &Some(ref c) => c.store_config().map(|c| c.clone()), + _ => None + } + }; + + Store::new(storepath, store_config).map(|store| { Runtime { cli_matches: matches, configuration: cfg,