summaryrefslogtreecommitdiff
path: root/std/fs/ensure_dir.ts
diff options
context:
space:
mode:
authorRy Dahl <ry@tinyclouds.org>2020-01-07 14:14:33 -0500
committerGitHub <noreply@github.com>2020-01-07 14:14:33 -0500
commitd4bf0670ce02a7561f224085bef6827132335cd5 (patch)
treeb9b102775fc31e9c867ce4810efc63a9f9518748 /std/fs/ensure_dir.ts
parentad9fd589d4131e847721323a730ba91161f1b95b (diff)
fix: Deno.mkdir should conform to style guide (#3617)
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;