Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(console): blob download args (#1729)
## Description - modifies the `blob download` ux to make it clear, and properly enforce having either a ticket or arguments for a download - All arguments apply to both ticket and hash but with different constrains. In the case of the ticket options can be used to override/remove ticket parts - makes sure failures still report the help text ## Notes & open questions ### Sample output: This would previously only show an error ``` > blob download Download data to the running node's database and provide it Usage: blob download <COMMAND> Commands: ticket Use a blob ticket to download the data hash Supply the content and node-addressing information directly to perform a download help Print this message or the help of the given subcommand(s) Options: -h, --help Print help (see more with '--help') ``` ### Calling commands: #### With a ticket: ``` > blob download ticket blobedjoqrkky753mdwphqrxbr2wjzkizv4hkb5s5ovav73c2zfuaja7aaibaiah6aaaahcfoaiaaaaaaaaaaaaaaaaaaaaaaaabyvlqcz2d7d7ouqasz36mapwfxqf2dx3zznb25nx32phl7kbgum23wtegaa ``` #### With args: ``` > blob download hash bafkr4ibzusj4ulmrhrbymsgklwlcencx63jwcurmoimjhk4mutqdsqhnqa --node 2luekswh7o3a5tz4enymovsoksgnpb2qpmxlvifp6ywwjnacihya --derp-region 1 ``` Both NOTE: Adding this a a subcommand is a consequence of clap-rs/clap#2621 ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [ ] Tests if relevant.
- Loading branch information
1 parent
2b70426
commit a916d4c
Showing
1 changed file
with
180 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters