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

Tweak some of the CLI help text #382

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Changes from all commits
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
28 changes: 14 additions & 14 deletions mountpoint-s3/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct CliArgs {
#[clap(help = "Name of bucket to mount", value_parser = parse_bucket_name)]
pub bucket_name: String,

#[clap(help = "Mount point for file system")]
#[clap(help = "Directory to mount the bucket at", value_name = "DIRECTORY")]
pub mount_point: PathBuf,

#[clap(
Expand Down Expand Up @@ -199,6 +199,16 @@ struct CliArgs {
#[clap(long, help = "Set the 'x-amz-request-payer' to 'requester' on S3 requests", help_heading = BUCKET_OPTIONS_HEADER)]
pub requester_pays: bool,

#[clap(
long,
help = "Do not sign requests. Credentials will not be loaded if this argument is provided.",
help_heading = AWS_CREDENTIALS
)]
pub no_sign_request: bool,

#[clap(long, help = "Use a specific profile from your credential file.", help_heading = AWS_CREDENTIALS)]
pub profile: Option<String>,

#[clap(
long,
help = "Mount file system in read-only mode",
Expand All @@ -221,12 +231,12 @@ struct CliArgs {

#[clap(
long,
help = "Desired throughput in Gbps [default: 10]",
help = "Maximum throughput in Gbps [default: auto-detected on EC2 instances, 10 Gbps elsewhere]",
value_name = "N",
value_parser = value_parser!(u64).range(1..),
help_heading = CLIENT_OPTIONS_HEADER
)]
pub throughput_target_gbps: Option<u64>,
pub maximum_throughput_gbps: Option<u64>,

#[clap(
long,
Expand Down Expand Up @@ -282,16 +292,6 @@ struct CliArgs {
#[clap(short, long, help = "Run as foreground process")]
pub foreground: bool,

#[clap(
long,
help = "Do not sign requests. Credentials will not be loaded if this argument is provided.",
help_heading = AWS_CREDENTIALS
)]
pub no_sign_request: bool,

#[clap(long, help = "Use a specific profile from your credential file.", help_heading = AWS_CREDENTIALS)]
pub profile: Option<String>,

#[clap(
long,
help = "Account ID of the expected bucket owner. \
Expand Down Expand Up @@ -438,7 +438,7 @@ fn mount(args: CliArgs) -> anyhow::Result<FuseSession> {
.context("Failed to parse endpoint URL")?;

let throughput_target_gbps =
args.throughput_target_gbps
args.maximum_throughput_gbps
.map(|t| t as f64)
.unwrap_or_else(|| match calculate_network_throughput() {
Ok(throughput) => throughput,
Expand Down
Loading