Use fs_err in more places (#926)

Before:

```
error: Failed to download distributions
  Caused by: Failed to fetch wheel: jaxlib==0.4.23+cuda12.cudnn89
  Caused by: Directory not empty (os error 39)
```

After:

```
error: Failed to download distributions
  Caused by: Failed to fetch wheel: jaxlib==0.4.23+cuda12.cudnn89
  Caused by: failed to rename file from /home/konsti/.cache/puffin/.tmpcG7tVP/jaxlib-0.4.23+cuda12.cudnn89-cp310-cp310-manylinux2014_x86_64.whl to /home/konsti/.cache/puffin/wheels-v0/index/9ff50b883297fa9d/jaxlib/jaxlib-0.4.23+cuda12.cudnn89-cp310-cp310-manylinux2014_x86_64
  Caused by: Directory not empty (os error 39)
```
This commit is contained in:
konsti 2024-01-15 10:39:33 +01:00 committed by GitHub
parent 05029d219f
commit 95f3cca28d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -834,7 +834,7 @@ impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> {
// Download the source distribution to a temporary file.
let sdist_file = temp_dir.path().join(source_dist_filename);
let mut writer = tokio::io::BufWriter::new(
tokio::fs::File::create(&sdist_file)
fs_err::tokio::File::create(&sdist_file)
.await
.map_err(puffin_client::Error::CacheWrite)?,
);