Skip to content
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

Show help for query-proposal-votes when no arg provided #2611

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

hqueue
Copy link
Contributor

@hqueue hqueue commented Feb 14, 2024

Describe your changes

Show help message for query-proposal-votes subcommand instead of crashing when no arg provided.

Before (crashed with panick)

$ ./namadac query-proposal-votes
The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: crates/apps/src/lib/cli/utils.rs:204

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

After

$ ./namadac query-proposal-votes
Query votes for the proposal.

Usage: namadac query-proposal-votes [OPTIONS]

Options:
      --node <node>                Address of a ledger node as "{scheme}://{host}:{port}". If the scheme is not supplied, it is assumed to be TCP.
      --proposal-id <proposal-id>  The proposal identifier.
      --voter <voter>              The address of the proposal voter.
  -h, --help                       Print help

Indicate on which release or other PRs this topic is based on

v0.31.4

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@hqueue hqueue changed the title Show help for query-proposal when no arg provided Show help for query-proposal-votes when no arg provided Feb 14, 2024
Show help for query-proposal-votes subcommand instead of crashing when no arg provided

Signed-off-by: Hyung-Kyu Choi <hyungkyu.choi@gmail.com>
@hqueue hqueue force-pushed the query-proposal-votes branch from 2d1205d to 28e4ae5 Compare February 14, 2024 18:17
Signed-off-by: Hyung-Kyu Choi <hyungkyu.choi@gmail.com>
Fraccaman pushed a commit that referenced this pull request Feb 19, 2024
* dsrvlabs/query-proposal-votes:
  add changelog
  show help for query-proposal-votes when no arg provided
Fraccaman pushed a commit that referenced this pull request Feb 20, 2024
* dsrvlabs/query-proposal-votes:
  add changelog
  show help for query-proposal-votes when no arg provided
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9181fbe) 53.38% compared to head (58a67b0) 53.38%.
Report is 8 commits behind head on main.

Files Patch % Lines
crates/apps/src/lib/cli.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2611   +/-   ##
=======================================
  Coverage   53.38%   53.38%           
=======================================
  Files         302      302           
  Lines      103398   103399    +1     
=======================================
+ Hits        55203    55204    +1     
  Misses      48195    48195           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tzemanovic tzemanovic merged commit 774e55b into anoma:main Feb 22, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants