Skip to content

Commit

Permalink
Make mutually-exclusive-features implies exclude-all-features
Browse files Browse the repository at this point in the history
Fixes #250
  • Loading branch information
taiki-e committed Apr 17, 2024
1 parent 26e4547 commit b81b7ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com

## [Unreleased]

- Fix bug in `--mutually-exclusive-features` option. ([#250](https://github.com/taiki-e/cargo-hack/issue/250))

## [0.6.27] - 2024-04-02

- Adjust command order of `--each-feature`/`--feature-powerset` to early run a case that is likely to find a problem. ([#247](https://github.com/taiki-e/cargo-hack/pull/247))
Expand Down
4 changes: 3 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ impl Args {
// https://github.com/taiki-e/cargo-hack/issues/42
// https://github.com/rust-lang/cargo/pull/8799
exclude_no_default_features |= !include_features.is_empty();
exclude_all_features |= !include_features.is_empty() || !exclude_features.is_empty();
exclude_all_features |= !include_features.is_empty()
|| !exclude_features.is_empty()
|| !mutually_exclusive_features.is_empty();
exclude_features.extend_from_slice(&features);

term::verbose::set(verbose != 0);
Expand Down

0 comments on commit b81b7ed

Please sign in to comment.