Skip to content

Commit

Permalink
fix: create folder sync error
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiden authored and Aiden committed Sep 16, 2024
1 parent 773ac00 commit 3a03dbd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/node-modules/create-folder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ export function createFolderSync(
...options,
};
const target = resolve(cwd, targetPath);
const stats = statSync(target);
if (!stats) {
try {
const stats = statSync(target);
if (!stats) {
mkdirSync(target, { recursive: true });
}
} catch {
mkdirSync(target, { recursive: true });
}
}

0 comments on commit 3a03dbd

Please sign in to comment.