You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@cjihrig This code shouldn't work based on the "getOptions" function.
The expected behavior is to throw :
TypeError [ERR_INVALID_OPT_VALUE]: The value "undefined" is invalid for option "flags"
at stringToFlags (internal/fs/utils.js:253:9)
at open (internal/fs/promises.js:198:34)
at Object.readFile (internal/fs/promises.js:466:20)
...
Because the object { encoding: 'utf8' } is not containing the flag attribute.
I think it is the getOptions' job, to put the non-optional 'flag' to the given object.
I got the code from the v10.15.0-proposal branch.
But if it is not a node issue, I close it.
@cjihrig This code shouldn't work based on the "getOptions" function.
The expected behavior is to throw :
TypeError [ERR_INVALID_OPT_VALUE]: The value "undefined" is invalid for option "flags"
at stringToFlags (internal/fs/utils.js:253:9)
at open (internal/fs/promises.js:198:34)
at Object.readFile (internal/fs/promises.js:466:20)
...
Because the object { encoding: 'utf8' } is not containing the flag attribute.
I think it is the getOptions' job, to put the non-optional 'flag' to the given object.
I got the code from the v10.15.0-proposal branch.
But if it is not a node issue, I close it.
Details:
electron-userland/electron-webpack#255
In short:
Here it is the implementation of getOptions:
But this code is working: