Skip to content
Closed
Prev Previous commit
Next Next commit
process: improve error message for process.cwd() when directory is de…
…leted also keeping the old code intact
  • Loading branch information
Ankush1oo8 committed Feb 21, 2025
commit a49675fc4959e233bf640bc0daf21a5ded936243
2 changes: 2 additions & 0 deletions src/node_process_methods.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ static void Cwd(const FunctionCallbackInfo<Value>& args) {
THROW_ERR_CWD_DELETED(env);
return;
}
Comment thread
Ankush1oo8 marked this conversation as resolved.
if (err)
return env->ThrowUVException(err, "uv_cwd");

Local<String> cwd = String::NewFromUtf8(env->isolate(),
buf,
Expand Down