From 3a560ccd48aa0aa64ff7ed8294dec490c2708752 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 3 Aug 2024 13:19:00 +1000 Subject: [PATCH] Fix args::parse Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- crates/bin/src/args.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bin/src/args.rs b/crates/bin/src/args.rs index 769718d0..f3721437 100644 --- a/crates/bin/src/args.rs +++ b/crates/bin/src/args.rs @@ -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::>()