Skip to content

Commit

Permalink
Fixed stdin option to conflicts only with paths arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ventaquil committed Aug 19, 2023
1 parent 9f2dc65 commit fd099ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fixed `stdin` option to conflicts only with `paths` arg.

### Changed

- Changed usage from `name` to `value_name` for `paths` arg.
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ pub enum Subcommand {
#[derive(Debug, clap::Args)]
pub struct Args {
/// Path to file or directory.
#[arg(required = true, value_name = "PATH")]
#[arg(required = true, value_name = "PATH", conflicts_with = "stdin")]
pub paths: Vec<PathBuf>,
}

#[derive(Debug, clap::Args)]
pub struct Options {
/// Calculate digest from stdin.
#[arg(short, long, default_value_t = false, exclusive = true)]
#[arg(short, long, default_value_t = false, conflicts_with = "paths")]
pub stdin: bool,
}

Expand Down

0 comments on commit fd099ac

Please sign in to comment.