Fix args::parse

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2024-08-03 13:19:00 +10:00 committed by GitHub
parent a9b11630a0
commit 3a560ccd48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -561,7 +561,7 @@ You cannot use --{option} and specify multiple packages at the same time. Do one
}
}
let has_strategy_override = !opts.overrides.is_empty();
let has_strategies_override = !opts.strategies.is_empty();
// Default strategies if empty
if opts.strategies.is_empty() {
@ -619,8 +619,8 @@ You cannot use --{option} and specify multiple packages at the same time. Do one
pkg_url: opts.pkg_url,
pkg_fmt: opts.pkg_fmt,
bin_dir: opts.bin_dir,
disabled_strategies: (!opts.disable_strategies.is_empty() || has_strategy_ovrrride).then(|| {
args.disable_strategies
disabled_strategies: (!opts.disable_strategies.is_empty() || has_strategies_ovrrride).then(|| {
opts.disable_strategies
.into_iter()
.map(|strategy| strategy.0)
.collect::<Vec<_>>()