feat: allow passing non-default features #48
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows for passing additional features for the package (either space or comma-separated, multiple occurrences of
--features [...]
are allowed). This allows us to pull licenses for optional dependencies. Notice that the default features are always enabled.If at least one non-existing feature is provided, the CLI will exit with an error message:
Similarly, passing empty feature list will error out as well:
(I guess this is desirable behavior to catch interpolating empty values in scripts etc.)
While this isn't a breaking change for the CLI itself (default features are preserved and the new option is, well, optional), this is a breaking change for the
cargo-bundle-licenses
as a library. If this is an issue, we can consider preserving the old API and creating separate methods / structs that the old API will proxy to.Fixes #47