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 May 31, 2022
1 parent cb5ccb0 commit 5315dd2
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 @@ -110,6 +110,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 5315dd2

Please sign in to comment.