Skip to content

Commit

Permalink
remove directory check
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz committed Sep 27, 2023
1 parent 7d4c04f commit 63f3731
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/cli-tools/src/cacheManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ function loadCache(name: string): Cache | undefined {
function saveCache(name: string, cache: Cache) {
const fullPath = path.resolve(getCacheRootPath(), name);

const dir = path.dirname(fullPath);
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
fs.mkdirSync(path.dirname(fullPath), {recursive: true});
fs.writeFileSync(fullPath, JSON.stringify(cache, null, 2));
}

Expand Down

0 comments on commit 63f3731

Please sign in to comment.