Skip to content

Commit

Permalink
fix(core): gracefully handle errors when writing the latest output ha…
Browse files Browse the repository at this point in the history
…sh cache files (#6959)

* fix(core): wrap writing cache hash into try/catch

Instead of failing the task run process it will allow the process to continue.

Fixes of #6957

* fix(core): ignore errors writing latest output hash cache files

Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
  • Loading branch information
minijus and leosvelperez committed Oct 1, 2021
1 parent 61bcab3 commit ae7361c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/workspace/src/tasks-runner/cache.ts
Expand Up @@ -151,7 +151,9 @@ export class Cache {
recordOutputsHash(outputs: string[], hash: string): void {
outputs.forEach((output) => {
const hashFile = this.getFileNameWithLatestRecordedHashForOutput(output);
writeToFile(hashFile, hash);
try {
writeToFile(hashFile, hash);
} catch {}
});
}

Expand Down

0 comments on commit ae7361c

Please sign in to comment.