summaryrefslogtreecommitdiff
path: root/std/fs/ensure_dir.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/fs/ensure_dir.ts')
-rw-r--r--std/fs/ensure_dir.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/fs/ensure_dir.ts b/std/fs/ensure_dir.ts
index 92db873b3..d4b30dd2d 100644
--- a/std/fs/ensure_dir.ts
+++ b/std/fs/ensure_dir.ts
@@ -18,7 +18,7 @@ export async function ensureDir(dir: string): Promise<void> {
} catch (err) {
if (err instanceof Deno.DenoError && err.kind === ErrorKind.NotFound) {
// if dir not exists. then create it.
- await mkdir(dir, true);
+ await mkdir(dir, { recursive: true });
return;
}
throw err;
@@ -41,7 +41,7 @@ export function ensureDirSync(dir: string): void {
} catch (err) {
if (err instanceof Deno.DenoError && err.kind == ErrorKind.NotFound) {
// if dir not exists. then create it.
- mkdirSync(dir, true);
+ mkdirSync(dir, { recursive: true });
return;
}
throw err;