mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 20:50:03 +00:00
Update binstall_v1::default_path
and fix typo in it
The postfix should be `.json`, not `.toml`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c5db0fefb5
commit
0d8b865ba4
1 changed files with 6 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::{
|
||||
borrow, cmp,
|
||||
collections::{btree_set, BTreeSet},
|
||||
hash,
|
||||
fs, hash,
|
||||
io::{self, Seek, Write},
|
||||
iter::{IntoIterator, Iterator},
|
||||
path::{Path, PathBuf},
|
||||
|
@ -132,7 +132,11 @@ pub fn write_to(
|
|||
}
|
||||
|
||||
pub fn default_path() -> Result<PathBuf, Error> {
|
||||
Ok(cargo_home()?.join(".binstall-crates.toml"))
|
||||
let dir = cargo_home()?.join("binstall");
|
||||
|
||||
fs::create_dir_all(&dir)?;
|
||||
|
||||
Ok(dir.join("crates-v1.json"))
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue