Skip to content

fs: fix error codes for `fs.cp`

The context passed into this error must have .code, .syscall and .message. https://github.com/nodejs/node/blob/36c0ac05e6d82786c58bbbff46715bb24efe90b4/lib/internal/errors.js#L215-L216

Maybe it'd worth adding a ESLint rule to catch this kind of mistakes.

Fixes: https://github.com/nodejs/node/issues/41104

Merge request reports

Loading