mirror of
https://github.com/Swatinem/rust-cache
synced 2025-04-29 06:35:53 +00:00
Clean up credentials.toml
This commit is contained in:
parent
5ec9842c14
commit
80c47cc945
3 changed files with 21 additions and 0 deletions
|
@ -91,6 +91,13 @@ export async function cleanBin(oldBins: Array<string>) {
|
|||
}
|
||||
|
||||
export async function cleanRegistry(packages: Packages, crates = true) {
|
||||
// remove `.cargo/credentials.toml`
|
||||
try {
|
||||
const credentials = path.join(CARGO_HOME, ".cargo", "credentials.toml");
|
||||
core.debug(`deleting "${credentials}"`);
|
||||
await fs.promises.unlink(credentials);
|
||||
} catch {}
|
||||
|
||||
// `.cargo/registry/index`
|
||||
let pkgSet = new Set(packages.map((p) => p.name));
|
||||
const indexDir = await fs.promises.opendir(path.join(CARGO_HOME, "registry", "index"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue