Skip to content

Commit 120996a

Browse files
committed
fix: make directories that don't exist
1 parent f3b5944 commit 120996a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export async function fileExists(path) {
2222
}
2323
}
2424

25-
export function writeFile(path, data) {
25+
export async function writeFile(path, data) {
26+
const dir = nodePath.dirname(path);
27+
await fs.mkdir(dir, { recursive: true });
2628
return fs.writeFile(path, data);
2729
}
2830

0 commit comments

Comments
 (0)