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

Adds default info to cli arg for --accounts-hash-cache-path #33331

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ledger-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 8a81ce0

"Use PATH as accounts hash cache location [default: <LEDGER>/accounts_hash_cache]",
);
let accounts_index_path_arg = Arg::with_name("accounts_index_path")
.long("accounts-index-path")
.value_name("PATH")
Expand Down
3 changes: 2 additions & 1 deletion validator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
.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("Use PATH as accounts hash cache location [default: <LEDGER>/accounts_hash_cache]"),
)
.arg(
Arg::with_name("snapshots")
Expand Down