Skip to content
Snippets Groups Projects
Verified Commit 9ff57779 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Disable creation of liner context - it causes installer_tui to lock

parent fbfc4edf
No related branches found
No related tags found
No related merge requests found
#![deny(warnings)]
#[macro_use]
extern crate serde_derive;
extern crate argon2;
......@@ -115,18 +113,22 @@ fn install_packages<S: AsRef<str>>(config: &Config, dest: &str, cookbook: Option
}
pub fn install<P: AsRef<Path>, S: AsRef<str>>(config: Config, output_dir: P, cookbook: Option<S>) -> Result<()> {
let mut context = liner::Context::new();
//let mut context = liner::Context::new();
macro_rules! prompt {
($dst:expr, $def:expr, $($arg:tt)*) => (if config.general.prompt {
match unwrap_or_prompt($dst, &mut context, &format!($($arg)*)) {
Ok(res) => if res.is_empty() {
Ok($def)
} else {
Ok(res)
},
Err(err) => Err(err)
}
Err(io::Error::new(
io::ErrorKind::Other,
"prompt not currently supported"
))
// match unwrap_or_prompt($dst, &mut context, &format!($($arg)*)) {
// Ok(res) => if res.is_empty() {
// Ok($def)
// } else {
// Ok(res)
// },
// Err(err) => Err(err)
// }
} else {
Ok($dst.unwrap_or($def))
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment