Skip to content

Commit

Permalink
fix: Creating cache for scoped packages (#2089)
Browse files Browse the repository at this point in the history
* fix creating cache for scoped packages

* remove directory check
  • Loading branch information
TMisiukiewicz committed Sep 27, 2023
1 parent 5832b01 commit 95f7587
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/cli-tools/src/cacheManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ function loadCache(name: string): Cache | undefined {
}

function saveCache(name: string, cache: Cache) {
fs.writeFileSync(
path.resolve(getCacheRootPath(), name),
JSON.stringify(cache, null, 2),
);
const fullPath = path.resolve(getCacheRootPath(), name);

fs.mkdirSync(path.dirname(fullPath), {recursive: true});
fs.writeFileSync(fullPath, JSON.stringify(cache, null, 2));
}

/**
Expand Down

0 comments on commit 95f7587

Please sign in to comment.