fix(cli): --features and --no-default-features should not be exclusive (#1846)
This commit is contained in:
parent
8d3d60c356
commit
f43d483090
1 changed files with 7 additions and 1 deletions
|
@ -518,11 +518,17 @@ class Builder {
|
|||
|
||||
private setFeatures() {
|
||||
const args = []
|
||||
if (this.options.allFeatures && this.options.allFeatures) {
|
||||
throw new Error(
|
||||
'Cannot specify --all-features and --no-default-features together',
|
||||
)
|
||||
}
|
||||
if (this.options.allFeatures) {
|
||||
args.push('--all-features')
|
||||
} else if (this.options.noDefaultFeatures) {
|
||||
args.push('--no-default-features')
|
||||
} else if (this.options.features) {
|
||||
}
|
||||
if (this.options.features) {
|
||||
args.push('--features', ...this.options.features)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue