fix: Skip binaries user didn't requst (#2199)

* fix: Skip binaries user didn't requst

Users may request only a subset of binaries via the --bin flag. In that
case, do not fail if binaries other than the ones requested are missing
from the downloaded archive.

* fix resolve.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* fix resolve.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* fix resolve.rs

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Remo Senekowitsch 2025-06-20 13:02:21 +02:00 committed by GitHub
parent aa459296fa
commit 4628235403
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 56 additions and 1 deletions

View file

@ -0,0 +1,17 @@
[package]
name = "cargo-binstall"
description = "Rust binary package installer for CI integration"
repository = "https://github.com/cargo-bins/cargo-binstall"
version = "0.12.0"
rust-version = "1.61.0"
authors = ["ryan <ryan@kurte.nz>"]
edition = "2021"
license = "GPL-3.0"
[[bin]]
name = "cargo-binstall"
path = "src/main.rs"
[[bin]]
name = "test"
path = "src/te.rs"

View file

@ -0,0 +1,27 @@
#!/bin/bash
set -euxo pipefail
unset CARGO_INSTALL_ROOT
CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
export CARGO_HOME
export PATH="$CARGO_HOME/bin:$PATH"
# Install binaries using `--manifest-path`
# Also test default github template
"./$1" binstall \
--force \
--manifest-path "manifests/skipping-required-bin-Cargo.toml" \
--no-confirm \
cargo-binstall \
--strategies crate-meta-data \
--bin cargo-binstall
# Test that the installed binaries can be run
cargo binstall --help >/dev/null
cargo_binstall_version="$(cargo binstall -V)"
echo "$cargo_binstall_version"
[ "$cargo_binstall_version" = "cargo-binstall 0.12.0" ]