Skip to content

Commit

Permalink
fix(core): caching individual files
Browse files Browse the repository at this point in the history
  • Loading branch information
kirjai committed Jul 21, 2021
1 parent f5587dc commit 9f55070
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/workspace/src/tasks-runner/cache.ts
Expand Up @@ -194,6 +194,13 @@ export class Cache {
const cacheOutputPath = join(cachedResult.outputsPath, 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 =
existsSync(cacheOutputPath) &&
existsSync(rootOutputPath) &&
Expand Down

0 comments on commit 9f55070

Please sign in to comment.