Exit with code 1 (error) if wizard failed. (#96)
* Exit with code 1 (error) if wizard failed. Should prevent error code 0 after `creation failed: failed to create database (are you not running as root?).` and similar errors. * Switch error messages from stdin to stderr for init_wizardpull/103/head
parent
8017539f82
commit
0942452950
|
@ -236,7 +236,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
match opt.command {
|
match opt.command {
|
||||||
Command::New { opts } => {
|
Command::New { opts } => {
|
||||||
if let Err(e) = initialize::init_wizard(&conf, opts) {
|
if let Err(e) = initialize::init_wizard(&conf, opts) {
|
||||||
println!("{}: {}.", "creation failed".red(), e);
|
eprintln!("{}: {}.", "creation failed".red(), e);
|
||||||
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Command::Uninstall { interface } => uninstall(&interface, &conf, opt.network)?,
|
Command::Uninstall { interface } => uninstall(&interface, &conf, opt.network)?,
|
||||||
|
|
Loading…
Reference in New Issue