mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Create meta files if not present
This commit is contained in:
parent
17cf6f5dc5
commit
68ba9b06f5
1 changed files with 6 additions and 4 deletions
|
@ -486,14 +486,16 @@ async fn install_from_package(
|
|||
|
||||
let bins: BTreeSet<String> = bin_files.iter().map(|bin| bin.base_name.clone()).collect();
|
||||
|
||||
{
|
||||
debug!("Writing .crates.toml");
|
||||
if let Ok(mut c1) = metafiles::v1::CratesToml::load() {
|
||||
let mut c1 = metafiles::v1::CratesToml::load().unwrap_or_default();
|
||||
c1.insert(cvs.clone(), bins.clone());
|
||||
c1.write()?;
|
||||
}
|
||||
|
||||
{
|
||||
debug!("Writing .crates2.json");
|
||||
if let Ok(mut c2) = metafiles::v2::Crates2Json::load() {
|
||||
let mut c2 = metafiles::v2::Crates2Json::load().unwrap_or_default();
|
||||
c2.insert(
|
||||
cvs.clone(),
|
||||
metafiles::v2::CrateInfo {
|
||||
|
|
Loading…
Add table
Reference in a new issue