Skip to content

Commit

Permalink
lib: absorb path error cases
Browse files Browse the repository at this point in the history
Absorb low level libuv failure in
the process initialization phase

Fixes: nodejs#33759
Refs: nodejs#33759 (comment)
PR-URL: nodejs#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>
  • Loading branch information
gireeshpunathil committed Jul 30, 2020
1 parent 1fe39f0 commit 4692e28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,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,
Expand Down

0 comments on commit 4692e28

Please sign in to comment.