Refactor ensureDir to remove redundant existence check

- Remove explicit `fs.existsSync` check in `ensureDir`.
- Rely on `fs.mkdirSync(dir, { recursive: true })` idempotency.
- Verified with existing tests in `test/ops.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-14 14:13:58 +00:00
1 parent 695adb6dc9
commit 758d3c3c56
1 file changed
+1 -3
+1 -3
View File
@@ -29,9 +29,7 @@ function getPaths(userRoot) {
}
function ensureDir(dir) {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}
fs.mkdirSync(dir, { recursive: true });
}
function transformContent(content) {