Skip to content

Commit

Permalink
fix: place _babel-node after process.execArgv
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jan 15, 2021
1 parent 6e9a174 commit 568ba63
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-node/src/_babel-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ if (program.eval || program.print) {

// add back on node and concat the sliced args
process.argv = ["node"].concat(args);
process.execArgv.unshift(__filename);
process.execArgv.push(__filename);

Module.runMain();
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const cluster = require("cluster");
console.log(typeof global.gc, cluster.isMaster);
if (cluster.isMaster) {
cluster.fork();
} else {
process.kill(process.pid);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"args": ["--expose_gc", "payload.js"],
"stdout": "function true\nfunction false"
}

0 comments on commit 568ba63

Please sign in to comment.