Skip to content

Commit

Permalink
fix(did-you-know): mkdirSync may fail
Browse files Browse the repository at this point in the history
  • Loading branch information
CoalYa committed Aug 15, 2024
1 parent 9e07c1a commit 27bb9e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion did-you-know/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default (api: any) => {

const cacheDir = path.join(api.paths.absNodeModulesPath, '.cache');
if (!fs.existsSync(cacheDir)) {
fs.mkdirSync(cacheDir);
fs.mkdirSync(cacheDir, { recursive: true });
}
fs.writeFileSync(recordJSONPath, JSON.stringify(records), 'utf-8');
});
Expand Down

0 comments on commit 27bb9e8

Please sign in to comment.