fs: fixup error message for invalid options.recursive · nodejs/node@8770fd9 · GitHub
Skip to content

Commit 8770fd9

Browse files
jasnelladdaleax
authored andcommitted
fs: fixup error message for invalid options.recursive
Use "options.recursive" instead of just "recursive" Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #32472 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1de9718 commit 8770fd9

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/fs.js

Lines changed: 2 additions & 2 deletions

lib/internal/fs/promises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ async function mkdir(path, options) {
346346
} = options || {};
347347
path = getValidatedPath(path);
348348
if (typeof recursive !== 'boolean')
349-
throw new ERR_INVALID_ARG_TYPE('recursive', 'boolean', recursive);
349+
throw new ERR_INVALID_ARG_TYPE('options.recursive', 'boolean', recursive);
350350

351351
return binding.mkdir(pathModule.toNamespacedPath(path),
352352
parseMode(mode, 'mode', 0o777), recursive,

test/parallel/test-fs-mkdir.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)