Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: fix confusing flags TypeError msg
File open flags must be an int when passed to the binding layer, but they must be a string when passed to the fs module (numbers are permitted, though undocumented). The module used to do no type checking, so the binding layer error would be thrown, and it was wrong: > fs.openSync('_') TypeError: flags must be an int at TypeError (native) at Object.fs.openSync (fs.js:549:18) It is now: > fs.openSync('_') TypeError: flag must be a string PR-URL: #2902 Reviewed-By: Ben Noordhuis <ben@strongloop.com>
- Loading branch information