mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-08 04:11:08 +03:00
Wallet command exit status on error (#1253)
This commit is contained in:
parent
bdfd5405c0
commit
12a2fc4f5a
1 changed files with 133 additions and 131 deletions
|
@ -659,13 +659,12 @@ fn wallet_command(wallet_args: &ArgMatches, global_config: GlobalConfig) {
|
|||
}
|
||||
|
||||
// Handle single-use (command line) owner commands
|
||||
{
|
||||
let wallet = Arc::new(Mutex::new(instantiate_wallet(
|
||||
wallet_config.clone(),
|
||||
passphrase,
|
||||
use_db,
|
||||
)));
|
||||
let _res = wallet::controller::owner_single_use(wallet, |api| {
|
||||
let res = wallet::controller::owner_single_use(wallet, |api| {
|
||||
match wallet_args.subcommand() {
|
||||
("send", Some(send_args)) => {
|
||||
let amount = send_args
|
||||
|
@ -795,7 +794,10 @@ fn wallet_command(wallet_args: &ArgMatches, global_config: GlobalConfig) {
|
|||
_ => panic!("Unknown wallet command, use 'grin help wallet' for details"),
|
||||
}
|
||||
});
|
||||
}
|
||||
// we need to give log output a chance to catch up before exiting
|
||||
thread::sleep(Duration::from_millis(100));
|
||||
|
||||
if res.is_err() {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue