3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2026-03-19 14:53:12 +00:00

fix: include target names in build/ and .fingerprint/ cleanup (#317)

This commit is contained in:
eitsupi 2026-03-15 00:23:14 +09:00 committed by GitHub
parent d7ac6f694d
commit bc1860267c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 291 additions and 291 deletions

View file

@ -58,7 +58,7 @@ async function cleanProfileTarget(profileDir: string, packages: Packages, checkT
let keepProfile = new Set(["build", ".fingerprint", "deps"]);
await rmExcept(profileDir, keepProfile);
const keepPkg = new Set(packages.map((p) => p.name));
const keepPkg = new Set(packages.flatMap((p) => [p.name, ...p.targets.map((t) => t.replace(/-/g, "_"))]));
await rmExcept(path.join(profileDir, "build"), keepPkg, checkTimestamp);
await rmExcept(path.join(profileDir, ".fingerprint"), keepPkg, checkTimestamp);