Skip to content

Commit

Permalink
Persist unique checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Aug 1, 2024
1 parent 383fb3a commit 9334ab3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources/src/wrapper-validation/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ export class ChecksumCache {
}

save(checksums: string[]): void {
const uniqueChecksums = [...new Set(checksums)]
// Save validated checksums to Gradle User Home
fs.mkdirSync(path.dirname(this.cacheFile), {recursive: true})
fs.writeFileSync(this.cacheFile, JSON.stringify(checksums))
fs.writeFileSync(this.cacheFile, JSON.stringify(uniqueChecksums))
}
}

0 comments on commit 9334ab3

Please sign in to comment.