Skip to content

Commit

Permalink
bootstrap: reset process._exit and process.exitCode in pre-execution
Browse files Browse the repository at this point in the history
PR-URL: #42466
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
  • Loading branch information
joyeecheung authored and juanarbol committed Apr 6, 2022
1 parent b89f038 commit b48a6cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ function patchProcessObject(expandArgv1) {
configurable: getOptionValue('--build-snapshot'),
value: process.argv[0]
});

process.exitCode = undefined;
process._exiting = false;
process.argv[0] = process.execPath;

if (expandArgv1 && process.argv[1] &&
Expand Down

0 comments on commit b48a6cb

Please sign in to comment.