Skip to content

Commit

Permalink
fix(did-you-know): mkdirSync may fail (#12642)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoalYa authored Aug 21, 2024
1 parent 96a9f9e commit 34b8a1d
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 34b8a1d

Please sign in to comment.