fix(core): caching individual files (#6445)
This commit is contained in:
parent
a1ccc87a07
commit
d53e25a611
@ -194,6 +194,13 @@ export class Cache {
|
|||||||
const cacheOutputPath = join(cachedResult.outputsPath, output);
|
const cacheOutputPath = join(cachedResult.outputsPath, output);
|
||||||
const rootOutputPath = join(this.root, output);
|
const rootOutputPath = join(this.root, output);
|
||||||
|
|
||||||
|
if (existsSync(cacheOutputPath) && lstatSync(cacheOutputPath).isFile()) {
|
||||||
|
return (
|
||||||
|
existsSync(join(cachedResult.outputsPath, output)) &&
|
||||||
|
!existsSync(join(this.root, output))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const haveDifferentAmountOfFiles =
|
const haveDifferentAmountOfFiles =
|
||||||
existsSync(cacheOutputPath) &&
|
existsSync(cacheOutputPath) &&
|
||||||
existsSync(rootOutputPath) &&
|
existsSync(rootOutputPath) &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user