mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 07:06:36 +00:00
Add a --bin
argument to mirror cargo install --bin
. (#2189)
* Add a --bin argument to mirror cargo install --bin. * Update crates/bin/src/args.rs Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Signed-off-by: Matan Lurey <matanlurey@users.noreply.github.com> * Update crates/binstalk/src/ops.rs Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Signed-off-by: Matan Lurey <matanlurey@users.noreply.github.com> * Address feedback, make e2e-test test both source/non-source. * Update crates/bin/src/entry.rs Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Signed-off-by: Matan Lurey <matanlurey@users.noreply.github.com> * Update crates/binstalk/src/ops/resolve/resolution.rs Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Signed-off-by: Matan Lurey <matanlurey@users.noreply.github.com> * Update crates/binstalk/src/ops/resolve/resolution.rs Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Signed-off-by: Matan Lurey <matanlurey@users.noreply.github.com> * Update crates/binstalk/src/ops/resolve/resolution.rs Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Signed-off-by: Matan Lurey <matanlurey@users.noreply.github.com> * Get everything compiling again. * optimize ResolutionFetch::resolve_bins Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fix e2e-test on unix due to ordering Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * fix specific-binaries.sh: relax no-compile Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Matan Lurey <matanlurey@users.noreply.github.com> 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:
parent
ea65a39d2d
commit
8d2b46b8bd
6 changed files with 83 additions and 6 deletions
|
@ -93,6 +93,20 @@ pub struct Args {
|
|||
)]
|
||||
pub(crate) targets: Option<Vec<String>>,
|
||||
|
||||
/// Install only the specified binaries.
|
||||
///
|
||||
/// This mirrors the equivalent argument in `cargo install --bin`.
|
||||
///
|
||||
/// If omitted, all binaries are installed.
|
||||
#[clap(
|
||||
help_heading = "Package selection",
|
||||
long,
|
||||
value_name = "BINARY",
|
||||
num_args = 1..,
|
||||
action = clap::ArgAction::Append
|
||||
)]
|
||||
pub(crate) bin: Option<Vec<CompactString>>,
|
||||
|
||||
/// Override Cargo.toml package manifest path.
|
||||
///
|
||||
/// This skips searching crates.io for a manifest and uses the specified path directly, useful
|
||||
|
|
|
@ -157,6 +157,10 @@ pub fn install_crates(
|
|||
desired_targets,
|
||||
resolvers,
|
||||
cargo_install_fallback,
|
||||
bins: args.bin.map(|mut bins| {
|
||||
bins.sort_unstable();
|
||||
bins
|
||||
}),
|
||||
|
||||
temp_dir: temp_dir.path().to_owned(),
|
||||
install_path,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue