Add a --bin argument to mirror cargo install --bin.

This commit is contained in:
Matan Lurey 2025-06-09 13:30:32 -07:00
parent ea65a39d2d
commit 75b3ef44fe
6 changed files with 49 additions and 6 deletions

View file

@ -87,11 +87,16 @@ impl ResolutionFetch {
current_version: self.new_version,
source: self.source,
target: self.fetcher.target().to_compact_string(),
bins: self
.bin_files
.into_iter()
.map(|bin| bin.base_name)
.collect(),
bins: opts
.bins
.as_ref()
.map(|bins| bins.iter().cloned().map(Into::into).collect())
.unwrap_or_else(|| {
self.bin_files
.into_iter()
.map(|bin| bin.base_name)
.collect()
}),
})
}