diff --git a/src/main.rs b/src/main.rs index c969713..961fb80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,6 +29,10 @@ fn main() -> XResult<()> { return Ok(()); } + if options.verbose { + print_message(MessageType::DEBUG, &format!("Config is: {}", &options.config)); + } + println!("Hello, world!"); println!("{}", SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs()); @@ -44,7 +48,13 @@ fn main() -> XResult<()> { // let openpgp_client = OpenPGPTool::from_file("sample.gpg")?; // openpgp_client.encrypt_file("a", "b.asc", true)?; - let config_json = get_config_json(None); // TODO + let config_json = get_config_json(if options.config == "" { None } else { Some(&options.config) }); + if config_json.is_none() { + return Ok(()); + } + + // TODO ... + // let j = config_json.unwrap(); // println!("{}", j);