Create store path on storage backend creation
This commit is contained in:
parent
abee4d4904
commit
731d13e0ba
2 changed files with 8 additions and 2 deletions
|
@ -25,6 +25,8 @@ mod module;
|
|||
mod storage;
|
||||
mod ui;
|
||||
|
||||
use std::process::exit;
|
||||
|
||||
fn main() {
|
||||
let yaml = load_yaml!("../etc/cli.yml");
|
||||
let app = App::from_yaml(yaml);
|
||||
|
@ -41,14 +43,17 @@ fn main() {
|
|||
|
||||
debug!("Runtime : {:?}", &rt);
|
||||
|
||||
let backend = StorageBackend::new(&rt).unwrap_or_else(|e| {
|
||||
error!("Error: {}", e);
|
||||
exit(1);
|
||||
});
|
||||
|
||||
if let Some(matches) = rt.config.cli_matches.subcommand_matches("bm") {
|
||||
let module = BMModule::new(&rt);
|
||||
let commands = module.get_commands(&rt);
|
||||
if let Some(command) = matches.subcommand_name() {
|
||||
debug!("Subcommand: {}", command);
|
||||
|
||||
let backend = StorageBackend::new(&rt);
|
||||
|
||||
let cmdenv = CommandEnv {
|
||||
rt: &rt,
|
||||
bk: &backend,
|
||||
|
|
|
@ -6,6 +6,7 @@ use std::path::Path;
|
|||
use std::path::PathBuf;
|
||||
use std::vec::Vec;
|
||||
use std::fs::File as FSFile;
|
||||
use std::fs::create_dir_all;
|
||||
use std::fs::remove_file;
|
||||
use std::io::Read;
|
||||
use std::io::Write;
|
||||
|
|
Loading…
Reference in a new issue