-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #11665 - ehuss:cargo-ok-truncated, r=epage
Handle .cargo-ok being truncated This fixes an issue where if the `.cargo-ok` file is truncated then Cargo will get stuck with being unable to extract the package. Creating the `.cargo-ok` file uses `create_new` which will fail if the file exists. If the file gets created, but there is a failure to flush it, or if the filesystem otherwise gets corrupted, then the `create_new` step will fail with `File exists`. The solution here is to delete the cache directory if the `.cargo-ok` file is truncated, as there may be some uncertainty of the validity of the cache. This also adds better error handling if there is some problem opening the `.cargo-ok` file instead of ignoring errors. Closes #11638
- Loading branch information
Showing
2 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters