-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Adds default info to cli arg for --accounts-hash-cache-path #33331
Adds default info to cli arg for --accounts-hash-cache-path #33331
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33331 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 793 793
Lines 214828 214828
=========================================
- Hits 176134 176126 -8
- Misses 38694 38702 +8 |
ledger-tool/src/main.rs
Outdated
@@ -1150,7 +1150,10 @@ fn main() { | |||
.long("accounts-hash-cache-path") | |||
.value_name("PATH") | |||
.takes_value(true) | |||
.help("Use PATH as accounts hash cache location"); | |||
.help("Use PATH as accounts hash cache location") | |||
.long_help( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not in .help()
? afaik, clap would automatically append a string to .help()
for .default()
's value if we could use it in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yep, you're right. Regular help
does include defaults. I'll make that change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8a81ce0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(cherry picked from commit 1d39c31) # Conflicts: # ledger-tool/src/main.rs
(cherry picked from commit 1d39c31) # Conflicts: # ledger-tool/src/main.rs
…ackport of #33331) (#33336) * Adds default info to cli arg for --accounts-hash-cache-path (#33331) (cherry picked from commit 1d39c31) # Conflicts: # ledger-tool/src/main.rs * resolve merge conflicts --------- Co-authored-by: Brooks <[email protected]>
Problem
The accounts hash cache path CLI arg does not inform the user what it's default value is.
Summary of Changes
Add default info.
Note, this PR is simple/minimal on purpose for ease of backporting. I'll do a subsequent PR to better generate the default string using
AccountsDb::DEFAULT_ACCOUNTS_HASH_CACHE_DIR
. (See #33117 (comment) for more context.)