Skip to content

Commit

Permalink
ref: Rename --token to --auth-token for get (#785)
Browse files Browse the repository at this point in the history
This is consistent with the naming for the provide subcommand and is
more descriptive as well.
  • Loading branch information
flub committed Feb 22, 2023
1 parent 7923829 commit d9aed3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum Commands {
peer: PeerId,
/// The authentication token to present to the server.
#[clap(long)]
token: String,
auth_token: String,
/// Optional address of the provider, defaults to 127.0.0.1:4433.
#[clap(long, short)]
addr: Option<SocketAddr>,
Expand Down Expand Up @@ -205,7 +205,7 @@ async fn main() -> Result<()> {
Commands::Get {
hash,
peer,
token,
auth_token,
addr,
out,
} => {
Expand All @@ -217,8 +217,8 @@ async fn main() -> Result<()> {
if let Some(addr) = addr {
opts.addr = addr;
}
let token =
AuthToken::from_str(&token).context("Wrong format for authentication token")?;
let token = AuthToken::from_str(&auth_token)
.context("Wrong format for authentication token")?;
tokio::select! {
biased;
res = get_interactive(*hash.as_hash(), opts, token, out) => {
Expand Down

0 comments on commit d9aed3c

Please sign in to comment.