diff --git a/src/metafiles/binstall_v1.rs b/src/metafiles/binstall_v1.rs index f93916ce..dd0428ba 100644 --- a/src/metafiles/binstall_v1.rs +++ b/src/metafiles/binstall_v1.rs @@ -2,7 +2,7 @@ use std::{ fs, io::{self, Write}, iter::IntoIterator, - path::Path, + path::{Path, PathBuf}, }; use compact_str::CompactString; @@ -13,7 +13,7 @@ use thiserror::Error; use url::Url; use crate::binstall::MetaData; -use crate::FileLock; +use crate::{cargo_home, FileLock}; #[derive(Debug, Serialize, Deserialize)] pub struct Item { @@ -108,3 +108,7 @@ where Ok(()) } + +pub fn default_path() -> Result { + Ok(cargo_home()?.join(".binstall-crates.toml")) +}