lib: absorb path error cases

Absorb low level libuv failure in
the process initialization phase

Fixes: https://github.com/nodejs/node/issues/33759
Refs: https://github.com/nodejs/node/issues/33759#issuecomment-663980558
PR-URL: https://github.com/nodejs/node/pull/34519
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
This commit is contained in:
Gireesh Punathil authored and Shelley Vohr committed 2020-08-05 08:54:29 -07:00
1 parent c4457d873f
commit 335cb0d1d1
1 file changed
+3 -1
+3 -1
View File
@@ -92,7 +92,9 @@ function patchProcessObject(expandArgv1) {
if (expandArgv1 && process.argv[1] && !process.argv[1].startsWith('-')) {
// Expand process.argv[1] into a full path.
const path = require('path');
process.argv[1] = path.resolve(process.argv[1]);
try {
process.argv[1] = path.resolve(process.argv[1]);
} catch {}
}
// TODO(joyeecheung): most of these should be deprecated and removed,