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

Add SilenceUsage flag to hide menu when an error occurs. #1068

Merged
merged 2 commits into from
Nov 2, 2022

Conversation

pinosu
Copy link
Contributor

@pinosu pinosu commented Nov 1, 2022

Resolves #973

@pinosu pinosu requested a review from alpe as a code owner November 1, 2022 13:24
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #1068 (16170cf) into main (84e24d3) will decrease coverage by 0.11%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1068      +/-   ##
==========================================
- Coverage   59.28%   59.16%   -0.12%     
==========================================
  Files          53       53              
  Lines        6722     6735      +13     
==========================================
  Hits         3985     3985              
- Misses       2442     2455      +13     
  Partials      295      295              
Impacted Files Coverage Δ
x/wasm/client/cli/genesis_msg.go 71.42% <ø> (ø)
x/wasm/client/cli/gov_tx.go 6.52% <ø> (ø)
x/wasm/client/cli/new_tx.go 0.00% <ø> (ø)
x/wasm/client/cli/query.go 0.00% <0.00%> (ø)
x/wasm/client/cli/tx.go 32.50% <0.00%> (-0.14%) ⬇️
x/wasm/module.go 37.90% <0.00%> (ø)
x/wasm/types/proposal.go 61.31% <0.00%> (-1.81%) ⬇️

Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

The changes look good but a lot of commands were touched. I was wondering if it is sufficient to set SilenceUsage: true on the GetTxCmd() only. WDYT?

@pinosu
Copy link
Contributor Author

pinosu commented Nov 2, 2022

Thanks for the PR!

The changes look good but a lot of commands were touched. I was wondering if it is sufficient to set SilenceUsage: true on the GetTxCmd() only. WDYT?

I agree that a more general soluton would be better. Unfortunately, I have tried your suggestion as first option but it didn't work. I had to add it to every command.

@alpe alpe merged commit 0223e2b into main Nov 2, 2022
@alpe alpe deleted the 973-hide_help_menu branch November 2, 2022 16:14
@alpe
Copy link
Contributor

alpe commented Nov 2, 2022

👍 Good work

NoahSaso pushed a commit to NoahSaso/wasmd that referenced this pull request Dec 2, 2022
* Add SilenceUsage flag to hide menu when an error occurs.

* Fix lint errors
Magicloud pushed a commit to fpco/wasmd that referenced this pull request Jan 13, 2023
* Add SilenceUsage flag to hide menu when an error occurs.

* Fix lint errors
conorpp pushed a commit to wormhole-foundation/wasmd that referenced this pull request Feb 1, 2023
* Add SilenceUsage flag to hide menu when an error occurs.

* Fix lint errors
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.

Errors styling & hide help menu
2 participants