mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 06:40:03 +00:00
Fix: --strategies on CLI do not seem to override disabled-strategies in the manifest (#1857)
* Fix cli override in entry.rs Forward `args.disabled_strategies` Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix `args::parse`: Do not free disabled_strategies Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix passing of cli_overrides Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Create strategies-test-override-Cargo.toml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Add e2e-tests for cli-overrides Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix entry.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fix entry.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix entry.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update strategies.sh Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Compute cli_overrides in args::parse Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fix use of args::parse main_impl.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update entry.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix args::parse Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix typo in args.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix args.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix fmt in args.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fix fmt in main_impl.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * update e2e-test-strategies Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update e2e-tests/strategies.sh Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update e2e-tests/strategies.sh Make sure both --strategies and --disable-strategies is tested Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Update strategies.sh Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
cdbb121112
commit
ee94b8b639
5 changed files with 47 additions and 18 deletions
|
@ -37,7 +37,7 @@ fi
|
|||
## Test compile-only strategy
|
||||
"./$1" binstall --no-confirm --strategies compile cargo-quickinstall@0.2.8
|
||||
|
||||
## Test --disable-strategies
|
||||
## Test Cargo.toml disable-strategies
|
||||
set +e
|
||||
|
||||
"./$1" binstall --no-confirm --manifest-path "manifests/strategies-test-Cargo.toml" cargo-update@11.1.2
|
||||
|
@ -49,3 +49,11 @@ if [ "$exit_code" != 94 ]; then
|
|||
echo "Expected exit code 94, but actual exit code $exit_code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
## Test --strategies overriding `disabled-strategies=["compile"]` in Cargo.toml
|
||||
"./$1" binstall --no-confirm --manifest-path "manifests/strategies-test-override-Cargo.toml" --strategies compile cargo-quickinstall@0.2.10
|
||||
|
||||
## Test --disable-strategies overriding `disabled-strategies=["compile"]` in Cargo.toml
|
||||
"./$1" binstall --no-confirm --manifest-path "manifests/strategies-test-override-Cargo.toml" --disable-strategies crate-meta-data,quick-install --force cargo-quickinstall@0.2.10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue