GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fs: fixup error message for invalid options.recursive · nodejs/node@8770fd9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • fs.js
    • internal/fs
      • promises.js
  • test/parallel
    • test-fs-mkdir.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/fs.js‎

Copy file name to clipboardExpand all lines: lib/fs.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ function mkdir(path, options, callback) {
859859
path = getValidatedPath(path);
860860

861861
if (typeof recursive !== 'boolean')
862-
throw new ERR_INVALID_ARG_TYPE('recursive', 'boolean', recursive);
862+
throw new ERR_INVALID_ARG_TYPE('options.recursive', 'boolean', recursive);
863863

864864
const req = new FSReqCallback();
865865
req.oncomplete = callback;
@@ -878,7 +878,7 @@ function mkdirSync(path, options) {
878878

879879
path = getValidatedPath(path);
880880
if (typeof recursive !== 'boolean')
881-
throw new ERR_INVALID_ARG_TYPE('recursive', 'boolean', recursive);
881+
throw new ERR_INVALID_ARG_TYPE('options.recursive', 'boolean', recursive);
882882

883883
const ctx = { path };
884884
const result = binding.mkdir(pathModule.toNamespacedPath(path),
Collapse file

‎lib/internal/fs/promises.js‎

Copy file name to clipboardExpand all lines: lib/internal/fs/promises.js
+1-1Lines 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,
Collapse file

‎test/parallel/test-fs-mkdir.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-mkdir.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ if (common.isMainThread && (common.isLinux || common.isOSX)) {
229229
{
230230
code: 'ERR_INVALID_ARG_TYPE',
231231
name: 'TypeError',
232-
message: 'The "recursive" argument must be of type boolean.' +
232+
message: 'The "options.recursive" property must be of type boolean.' +
233233
received
234234
}
235235
);
@@ -238,7 +238,7 @@ if (common.isMainThread && (common.isLinux || common.isOSX)) {
238238
{
239239
code: 'ERR_INVALID_ARG_TYPE',
240240
name: 'TypeError',
241-
message: 'The "recursive" argument must be of type boolean.' +
241+
message: 'The "options.recursive" property must be of type boolean.' +
242242
received
243243
}
244244
);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.