mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-08 13:10: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::{
|
use std::{
|
||||||
borrow, cmp,
|
borrow, cmp,
|
||||||
collections::{btree_set, BTreeSet},
|
collections::{btree_set, BTreeSet},
|
||||||
hash,
|
fs, hash,
|
||||||
io::{self, Seek, Write},
|
io::{self, Seek, Write},
|
||||||
iter::{IntoIterator, Iterator},
|
iter::{IntoIterator, Iterator},
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
|
@ -132,7 +132,11 @@ pub fn write_to(
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn default_path() -> Result<PathBuf, Error> {
|
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)]
|
#[derive(Debug)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue