Fix quickinstall failing when packages are not wrapped in a folder

This commit is contained in:
Félix Saparelli 2022-02-16 22:42:37 +13:00
parent 49f3489398
commit b5d6d68d6d
4 changed files with 23 additions and 2 deletions

View file

@ -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(())