fix(process): clarify error when process.cwd() fails due to missing d…#58361
fix(process): clarify error when process.cwd() fails due to missing d…#58361carlos-menezes wants to merge 1 commit intonodejs:mainfrom
Conversation
|
Hi, Carlos Thank you so much for taking the time to open this pull request. I can see the effort and thought you’ve put into it. Although this PR handles a extremely rare case, which is likely not gonna happen and, the current Also, as a note a-side, may be worth reading the contributing guidelines and/or take a low-hanging fruit. |
|
@juanarbol thanks for the guidance. Feel free to close this PR in that case. I assumed the issue linked in the PR was considered a low-hanging fruit contribution given it has the |
| size_t cwd_len = sizeof(buf); | ||
| int err = uv_cwd(buf, &cwd_len); | ||
| if (err) { | ||
| if (err == UV_ENOENT) { |
There was a problem hiding this comment.
The error that's thrown already has an "ENOENT" error code. This shouldn't be necessary.
There was a problem hiding this comment.
It does, but from the linked issue it is often non-obvious where the error actually came from. By applying this change it makes it clearer why this ENOENT error happened.
Closes #57045.