Skip to content

Fix exit code #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix exit code #173

wants to merge 1 commit into from

Conversation

va-an
Copy link

@va-an va-an commented Jan 21, 2025

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.

@tvpeter
Copy link
Contributor

tvpeter commented Apr 15, 2025

@va-an, could you please rebase and confirm if the issue still exists; otherwise close the PR. Thank you for your efforts.

@va-an
Copy link
Author

va-an commented Apr 17, 2025

@va-an, could you please rebase and confirm if the issue still exists; otherwise close the PR. Thank you for your efforts.

I've replied in #170.
Let's discuss there.

@va-an
Copy link
Author

va-an commented Apr 18, 2025

@tvpeter, rebased to master.
I composed a command as close as possible to the one in the original issue in order to reproduce the behavior.

From master - exit code 0:

-> % cargo run --features electrum -- \
    --network signet \
    wallet \
    --int-descriptor "" \
    --client-type electrum \
    --database-type sqlite \
    --url some \
    new_address
[2025-04-18T14:31:56Z ERROR bdk_cli] Generic error: An external descriptor is required.
-> % echo $?
0

With fix - exit code 1:

-> % cargo run --features electrum -- \
    --network signet \
    wallet \
    --int-descriptor "" \
    --client-type electrum \
    --database-type sqlite \
    --url some \
    new_address
[2025-04-18T14:31:19Z ERROR bdk_cli] Generic error: An external descriptor is required.
-> % echo $?
1

@notmandatory notmandatory added the bug Something isn't working label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants