Skip to content

Commit f56ca5e

Browse files
committed
Merge #173: Fix exit code
304729b fix: use exit code 1 in case of error (Vadim Anufriev) Pull request description: Fix for #170. I think this is the simplest way to do it. It's also possible to change the main signature to return `Result`, which should provide similar behavior, but this option isn't compatible with the `#[maybe_async]` macro, so I decided not to complicate things. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR Top commit has no ACKs. Tree-SHA512: 52ce4292c3a8347bdb6ec975bb33a728c8eb2a1cdc90647a2834fc3428106a4aef1c3cf6b526905e5a36ea2734759338b5dfd4d3a55778507fc59893f585cf7d
2 parents 573eea7 + 304729b commit f56ca5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ async fn main() {
3636
match handle_command(cli_opts).await {
3737
Ok(result) => println!("{}", result),
3838
Err(e) => {
39-
error!("{}", e)
39+
error!("{}", e);
40+
std::process::exit(1);
4041
}
4142
}
4243
}

0 commit comments

Comments
 (0)