mirror of
https://github.com/tonarino/innernet.git
synced 2024-11-10 08:55:38 +08:00
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_wizard
This commit is contained in:
parent
8017539f82
commit
0942452950
1 changed files with 2 additions and 1 deletions
|
@ -236,7 +236,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
match opt.command {
|
||||
Command::New { 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)?,
|
||||
|
|
Loading…
Reference in a new issue