Skip to content

Commit

Permalink
Allow latter --web-bundle to override the former
Browse files Browse the repository at this point in the history
This makes use of `Arg::overrides_with` since clap v2.29.3.
  • Loading branch information
bryango committed Dec 18, 2023
1 parent 006aace commit 3056a01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bin/tectonic/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct CompileOptions {
bundle: Option<PathBuf>,

/// Use this URL to find resource files instead of the default
#[structopt(takes_value(true), long, short, name = "url")]
#[structopt(takes_value(true), long, short, name = "url", overrides_with = "url")]
// TODO add URL validation
web_bundle: Option<String>,

Expand Down
4 changes: 2 additions & 2 deletions src/bin/tectonic/v2cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ pub struct NewCommand {
path: PathBuf,

/// Use this URL to find resource files instead of the default
#[structopt(takes_value(true), long, short, name = "url")]
#[structopt(takes_value(true), long, short, name = "url", overrides_with = "url")]
// TODO add URL validation
web_bundle: Option<String>,

Check warning on line 683 in src/bin/tectonic/v2cli.rs

View check run for this annotation

Codecov / codecov/patch

src/bin/tectonic/v2cli.rs#L683

Added line #L683 was not covered by tests
}
Expand Down Expand Up @@ -709,7 +709,7 @@ impl NewCommand {
#[derive(Debug, Eq, PartialEq, StructOpt)]
pub struct InitCommand {
/// Use this URL to find resource files instead of the default
#[structopt(takes_value(true), long, short, name = "url")]
#[structopt(takes_value(true), long, short, name = "url", overrides_with = "url")]
// TODO add URL validation
web_bundle: Option<String>,

Check warning on line 714 in src/bin/tectonic/v2cli.rs

View check run for this annotation

Codecov / codecov/patch

src/bin/tectonic/v2cli.rs#L714

Added line #L714 was not covered by tests
}
Expand Down

0 comments on commit 3056a01

Please sign in to comment.