mirror of
https://github.com/Swatinem/rust-cache
synced 2025-06-28 02:58:47 +00:00
Only key by Cargo.toml
and Cargo.lock
files of workspace members (#180)
This commit is contained in:
parent
b1db5f9d5f
commit
d30f1144e8
7 changed files with 88 additions and 62 deletions
|
@ -4,6 +4,7 @@ import fs from "fs";
|
|||
import path from "path";
|
||||
|
||||
import { CARGO_HOME } from "./config";
|
||||
import { exists } from "./utils";
|
||||
import { Packages } from "./workspace";
|
||||
|
||||
export async function cleanTargetDir(targetDir: string, packages: Packages, checkTimestamp = false) {
|
||||
|
@ -308,12 +309,3 @@ async function rmRF(dirName: string) {
|
|||
core.debug(`deleting "${dirName}"`);
|
||||
await io.rmRF(dirName);
|
||||
}
|
||||
|
||||
async function exists(path: string) {
|
||||
try {
|
||||
await fs.promises.access(path);
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue