mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-05 11:40:04 +00:00
Fix quickinstall failing when packages are not wrapped in a folder
This commit is contained in:
parent
49f3489398
commit
b5d6d68d6d
4 changed files with 23 additions and 2 deletions
|
@ -45,8 +45,10 @@ pub async fn download<P: AsRef<Path>>(url: &str, path: P) -> Result<(), anyhow::
|
|||
|
||||
let bytes = resp.bytes().await?;
|
||||
|
||||
debug!("Download OK, writing to file: '{:?}'", path.as_ref());
|
||||
let path = path.as_ref();
|
||||
debug!("Download OK, writing to file: '{}'", path.display());
|
||||
|
||||
std::fs::create_dir_all(path.parent().unwrap())?;
|
||||
std::fs::write(&path, bytes)?;
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue