Skip to content

fs: bad error message in fs.openSync #2871

@ronkorving

Description

@ronkorving

Calling:

fs.openSync(path, { flags: 'w' });

Throws: TypeError: flags must be an int from native land.
While on the C++ side, that may be correct, in JavaScript land, the 2nd argument is not an int but a string.

In other words, yes, me passing an object was bad, but the error informed me to do the wrong thing compared to what the docs say.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions